update graphql/graphql -> v0.13.2.

https://github.com/graphql/graphql-js/blob/v0.13.2/src/graphql.js
This commit is contained in:
Firede
2018-03-28 00:52:32 +08:00
parent 107916a7eb
commit 2a02f2f7ee
+29 -14
View File
@@ -33,25 +33,40 @@ import { ExecutionResult } from "./execution/execute";
* If not provided, the default field resolver is used (which looks for a
* value or method on the source value with the field's name).
*/
export function graphql(args: {
export interface GraphQLArgs {
schema: GraphQLSchema;
source: string | Source;
source: Source | string;
rootValue?: any;
contextValue?: any;
variableValues?: {
[key: string]: any;
};
operationName?: string;
fieldResolver?: GraphQLFieldResolver<any, any>;
}): Promise<ExecutionResult>;
variableValues?: { [key: string]: any } | void;
operationName?: string | void;
fieldResolver?: GraphQLFieldResolver<any, any> | void;
}
export function graphql(args: GraphQLArgs): Promise<ExecutionResult>;
export function graphql(
schema: GraphQLSchema,
source: string | Source,
source: Source | string,
rootValue?: any,
contextValue?: any,
variableValues?: {
[key: string]: any;
},
operationName?: string,
fieldResolver?: GraphQLFieldResolver<any, any>
variableValues?: { [key: string]: any } | void,
operationName?: string | void,
fieldResolver?: GraphQLFieldResolver<any, any> | void
): Promise<ExecutionResult>;
/**
* The graphqlSync function also fulfills GraphQL operations by parsing,
* validating, and executing a GraphQL document along side a GraphQL schema.
* However, it guarantees to complete synchronously (or throw an error) assuming
* that all field resolvers are also synchronous.
*/
export function graphqlSync(args: GraphQLArgs): ExecutionResult;
export function graphqlSync(
schema: GraphQLSchema,
source: Source | string,
rootValue?: any,
contextValue?: any,
variableValues?: { [key: string]: any } | void,
operationName?: string | void,
fieldResolver?: GraphQLFieldResolver<any, any> | void
): ExecutionResult;