12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- import Maybe from './tsutils/Maybe';
- import { Source } from './language/source';
- import { GraphQLSchema } from './type/schema';
- import { GraphQLFieldResolver, GraphQLTypeResolver } from './type/definition';
- import {
- ExecutionResult,
- ExecutionResultDataDefault,
- } from './execution/execute';
- export interface GraphQLArgs {
- schema: GraphQLSchema;
- source: string | Source;
- rootValue?: any;
- contextValue?: any;
- variableValues?: Maybe<{ [key: string]: any }>;
- operationName?: Maybe<string>;
- fieldResolver?: Maybe<GraphQLFieldResolver<any, any>>;
- typeResolver?: Maybe<GraphQLTypeResolver<any, any>>;
- }
- export function graphql<TData = ExecutionResultDataDefault>(
- args: GraphQLArgs,
- ): Promise<ExecutionResult<TData>>;
- export function graphql<TData = ExecutionResultDataDefault>(
- schema: GraphQLSchema,
- source: Source | string,
- rootValue?: any,
- contextValue?: any,
- variableValues?: Maybe<{ [key: string]: any }>,
- operationName?: Maybe<string>,
- fieldResolver?: Maybe<GraphQLFieldResolver<any, any>>,
- typeResolver?: Maybe<GraphQLTypeResolver<any, any>>,
- ): Promise<ExecutionResult<TData>>;
- export function graphqlSync<TData = ExecutionResultDataDefault>(
- args: GraphQLArgs,
- ): ExecutionResult<TData>;
- export function graphqlSync<TData = ExecutionResultDataDefault>(
- schema: GraphQLSchema,
- source: Source | string,
- rootValue?: any,
- contextValue?: any,
- variableValues?: Maybe<{ [key: string]: any }>,
- operationName?: Maybe<string>,
- fieldResolver?: Maybe<GraphQLFieldResolver<any, any>>,
- typeResolver?: Maybe<GraphQLTypeResolver<any, any>>,
- ): ExecutionResult<TData>;
|