Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added graphql-17.0.0-alpha.9.tgz
Binary file not shown.
12 changes: 12 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"graphql": "16.11.0",
"graphql-subscriptions": "3.0.0",
"graphql-tag": "2.12.6",
"graphql17": "file:graphql-17.0.0-alpha.9.tgz",
"jest": "30.0.5",
"jest-config": "30.0.5",
"jest-junit": "16.0.0",
Expand Down
7 changes: 6 additions & 1 deletion packages/server/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@ import baseConfig from '../../jest.config.base.js';

// This needs to be "cloned" since jest depends on the object's identity in some
// way, whether it's via mutation or something else.
export default { ...baseConfig };
export default {
...baseConfig,
testEnvironmentOptions: {
customExportConditions: ['node', 'development'],
},
};
22 changes: 22 additions & 0 deletions packages/server/src/__tests__/testGraphql17DevMode.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { describe, it, expect } from '@jest/globals';
import { GraphQLObjectType, isObjectType, version } from 'graphql17';

describe('canary graphql v17-alpha', () => {
it('should work', () => {
expect(version).toBe('17.0.0-alpha.9'); // this version is the latest alpha on which the canary is based
});

it('should use development mode when set by our Jest Config', () => {
function getFakeGraphQLObjectType() {
class GraphQLObjectType {
get [Symbol.toStringTag]() {
return 'GraphQLObjectType';
}
}
return new GraphQLObjectType();
}

expect(isObjectType(new GraphQLObjectType({ name: 'SomeType', fields: {} }))).toBe(true);
expect(() => isObjectType(getFakeGraphQLObjectType())).toThrow();
});
});