Skip to content

Commit f385976

Browse files
committed
Allow specifying errorPropagation at top level
1 parent ddb57d1 commit f385976

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/graphql.ts

+8
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ export interface GraphQLArgs {
6666
operationName?: Maybe<string>;
6767
fieldResolver?: Maybe<GraphQLFieldResolver<any, any>>;
6868
typeResolver?: Maybe<GraphQLTypeResolver<any, any>>;
69+
/**
70+
* Set to `false` to disable error propagation. Experimental.
71+
*
72+
* @experimental
73+
*/
74+
errorPropagation?: boolean;
6975
}
7076

7177
export function graphql(args: GraphQLArgs): Promise<ExecutionResult> {
@@ -106,6 +112,7 @@ function graphqlImpl(args: GraphQLArgs): PromiseOrValue<ExecutionResult> {
106112
operationName,
107113
fieldResolver,
108114
typeResolver,
115+
errorPropagation,
109116
} = args;
110117

111118
// Validate Schema
@@ -138,5 +145,6 @@ function graphqlImpl(args: GraphQLArgs): PromiseOrValue<ExecutionResult> {
138145
operationName,
139146
fieldResolver,
140147
typeResolver,
148+
errorPropagation,
141149
});
142150
}

0 commit comments

Comments
 (0)