示例#1
0
        public static Task <ExecutionResult> ExecuteGraphQLQueryAsync(this DbContext context, string query, string variables = null, string operationName = null, CancellationToken cancellationToken = default(CancellationToken))
        {
            var inputs = string.IsNullOrEmpty(variables)
                ? null
                : variables.ToInputs();

            return(context.ExecuteGraphQLQueryAsync(query, inputs, operationName, cancellationToken));
        }
示例#2
0
 public static ExecutionResult ExecuteGraphQLQuery(this DbContext context, string query, IDictionary <string, object> variables, string operationName = null)
 => context.ExecuteGraphQLQueryAsync(query, variables, operationName).GetAwaiter().GetResult();