We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
While writing a test I discovered that enums are not listed in the visitedTypes. And cause testModule to fail.
My test:
it('Resolves query', async () => { const mockData = { contact: { email: '[email protected]', name: 'Bruce', phone: '913-555-1212', }, }; const mockResult = { _id: '1e9f12ca136a0d24b4a08821', ...mockData, }; const app = testkit.testModule(myModule, { inheritTypeDefs: [module1, module2], providers: [ { provide: myProvider, useValue: { getOne() { return { ...mockData, }; }, }, }, ], }); const result = await testkit.execute(app, { document: gql` query { getFromDatabase(filter: { _id: "1e9f12ca136a0d24b4a08821" }) { _id contact { email name phone } } } `, }); expect(result.errors).toBeFalsy(); expect(typeof result.data.getFromDatabase).toBe('object'); expect(result.data.getFromDatabase).toEqual(mockResult); })
A workaround I have found is to include the Module with the enum types in both the inheritTypeDefs and the modules.
Environment:
@graphql-modules/...
The text was updated successfully, but these errors were encountered:
No branches or pull requests
While writing a test I discovered that enums are not listed in the visitedTypes. And cause testModule to fail.
My test:
A workaround I have found is to include the Module with the enum types in both the inheritTypeDefs and the modules.
Environment:
@graphql-modules/...
:The text was updated successfully, but these errors were encountered: