Skip to content

Commit e6789ef

Browse files
committed
revert docs changes
1 parent 610c76a commit e6789ef

File tree

1 file changed

+13
-28
lines changed

1 file changed

+13
-28
lines changed

website/pages/api-v16/execution.mdx

Lines changed: 13 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,16 @@ const { execute } = require('graphql'); // CommonJS
2929
### execute
3030

3131
```ts
32-
export function execute({
32+
export function execute(
3333
schema: GraphQLSchema,
34-
document: DocumentNode,
35-
rootValue?: unknown,
36-
contextValue?: unknown,
34+
documentAST: Document,
35+
rootValue?: mixed,
36+
contextValue?: mixed,
3737
variableValues?: { [key: string]: mixed },
3838
operationName?: string,
39-
fieldResolver?: Maybe<GraphQLFieldResolver<any, any>>;
40-
typeResolver?: Maybe<GraphQLTypeResolver<any, any>>;
41-
subscribeFieldResolver?: Maybe<GraphQLFieldResolver<any, any>>;
42-
options?: { maxCoercionErrors?: number };
43-
}): PromiseOrValue<ExecutionResult>;
39+
): MaybePromise<ExecutionResult>;
4440

45-
type PromiseOrValue<T> = Promise<T> | T;
41+
type MaybePromise<T> = Promise<T> | T;
4642

4743
interface ExecutionResult<
4844
TData = ObjMap<unknown>,
@@ -65,32 +61,21 @@ a GraphQLError will be thrown immediately explaining the invalid input.
6561
executing the query, `errors` is null if no errors occurred, and is a
6662
non-empty array if an error occurred.
6763

68-
#### options
69-
70-
##### maxCoercionErrors
71-
72-
Set the maximum number of errors allowed for coercing (defaults to 50).
73-
7464
### executeSync
7565

7666
```ts
77-
export function executeSync({
67+
export function executeSync(
7868
schema: GraphQLSchema,
79-
document: DocumentNode,
80-
rootValue?: unknown,
81-
contextValue?: unknown,
69+
documentAST: Document,
70+
rootValue?: mixed,
71+
contextValue?: mixed,
8272
variableValues?: { [key: string]: mixed },
8373
operationName?: string,
84-
fieldResolver?: Maybe<GraphQLFieldResolver<any, any>>;
85-
typeResolver?: Maybe<GraphQLTypeResolver<any, any>>;
86-
subscribeFieldResolver?: Maybe<GraphQLFieldResolver<any, any>>;
87-
options?: { maxCoercionErrors?: number };
88-
}): ExecutionResult;
74+
): ExecutionResult;
8975

9076
type ExecutionResult = {
91-
errors?: ReadonlyArray<GraphQLError>;
92-
data?: TData | null;
93-
extensions?: TExtensions;
77+
data: Object;
78+
errors?: GraphQLError[];
9479
};
9580
```
9681

0 commit comments

Comments
 (0)