File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,13 @@ import type { Constructor } from './jsutils/instanceOf.js';
3
3
import { symbolForGraphQLInstanceOfCheck } from './jsutils/instanceOf.js' ;
4
4
5
5
/**
6
- * A replacement for instanceof which includes an error warning when multi-realm
7
- * constructors are detected.
6
+ * An additional check to be included within instanceOf warning when
7
+ * multi-realm constructors are detected.
8
+ *
9
+ * This additional check will be included:
10
+ * 1. if 'graphql/development.js' is imported explicitly prior to all
11
+ * other imports from this library, or
12
+ * 2. if the "development" condition is set.
8
13
*/
9
14
export function developmentInstanceOfCheck (
10
15
value : unknown ,
Original file line number Diff line number Diff line change @@ -2,6 +2,15 @@ export const symbolForGraphQLInstanceOfCheck = Symbol.for(
2
2
'graphql.instanceOfCheck' ,
3
3
) ;
4
4
5
+ /**
6
+ * "src/development.ts" includes an additional check for development mode
7
+ * which throws on multiple versions of graphql-js.
8
+ *
9
+ * This additional check will be included:
10
+ * 1. if 'graphql/development.js' is imported explicitly prior to all
11
+ * other imports from this library, or
12
+ * 2. if the "development" condition is set.
13
+ */
5
14
const check : ( _value : unknown , _constructor : Constructor ) => void =
6
15
( globalThis as any ) [ symbolForGraphQLInstanceOfCheck ] ??
7
16
( ( _value : unknown , _constructor : Constructor ) => {
You can’t perform that action at this time.
0 commit comments