Skip to content

Commit 6390604

Browse files
committed
Reorder so NO_PROPAGATE is first
1 parent 34cb2cf commit 6390604

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/error/ErrorBehavior.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
export type GraphQLErrorBehavior = 'PROPAGATE' | 'NO_PROPAGATE' | 'ABORT';
1+
export type GraphQLErrorBehavior = 'NO_PROPAGATE' | 'PROPAGATE' | 'ABORT';
22

33
export function isErrorBehavior(
44
onError: unknown,
55
): onError is GraphQLErrorBehavior {
66
return (
7-
onError === 'PROPAGATE' || onError === 'NO_PROPAGATE' || onError === 'ABORT'
7+
onError === 'NO_PROPAGATE' || onError === 'PROPAGATE' || onError === 'ABORT'
88
);
99
}

src/execution/execute.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ export function buildExecutionContext(
311311
if (onError != null && !isErrorBehavior(onError)) {
312312
return [
313313
new GraphQLError(
314-
'Unsupported `onError` value; supported values are `PROPAGATE`, `NO_PROPAGATE` and `ABORT`.',
314+
'Unsupported `onError` value; supported values are `NO_PROPAGATE`, `PROPAGATE` and `ABORT`.',
315315
),
316316
];
317317
}

0 commit comments

Comments
 (0)