You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I test my project with mocha, it runs fine. When I run with mocha --watch, the first test passes and the second one reports Error: Schema must contain uniquely named types but contains multiple types named "CreateNoteResponse".
I'd expect that reloading works. Possibly related to Webpack hot reload issues in #289 ?
Logs
Error: Schema must contain uniquely named types but contains multiple types named "CreateNoteResponse".
at typeMapReducer (node_modules/graphql/type/schema.js:262:13)
at Array.reduce (<anonymous>)
at new GraphQLSchema (node_modules/graphql/type/schema.js:145:28)
at Function.generateFromMetadataSync (node_modules/type-graphql/dist/schema/schema-generator.js:31:24)
at Function.<anonymous> (node_modules/type-graphql/dist/schema/schema-generator.js:16:33)
Enviorment (please complete the following information):
OS: macOS 10.14.6
Node: v10.16.3
Package version: v0.17.6
TypeScript version: 3.8.2
Additional context
Way back when I set up the project, I used Jest instead. I don't believe it had this issue, but I can't confirm that.
Also, I attempted to solve this with getMetadataStorage().clear() before running buildSchema, but that resulted in Error: Type Query must define one or more fields..
The issue occurs regardless of whether or not you use buildSchema or buildSchemaSync.
The text was updated successfully, but these errors were encountered:
Describe the bug
When I test my project with
mocha
, it runs fine. When I run withmocha --watch
, the first test passes and the second one reportsError: Schema must contain uniquely named types but contains multiple types named "CreateNoteResponse".
To Reproduce
Using this
.mocharrc.js
:mocha --watch
Expected behavior
I'd expect that reloading works. Possibly related to Webpack hot reload issues in #289 ?
Logs
Enviorment (please complete the following information):
Additional context
Way back when I set up the project, I used Jest instead. I don't believe it had this issue, but I can't confirm that.
Also, I attempted to solve this with
getMetadataStorage().clear()
before runningbuildSchema
, but that resulted inError: Type Query must define one or more fields.
.The issue occurs regardless of whether or not you use
buildSchema
orbuildSchemaSync
.The text was updated successfully, but these errors were encountered: