mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
update graphql/graphql -> v0.13.2.
https://github.com/graphql/graphql-js/blob/v0.13.2/src/graphql.js
This commit is contained in:
Vendored
+29
-14
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user