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
I'm using graphql-import and ApolloServer and I'm running into the following error:
Error: There can be only one type named "CacheControlScope".
Enum value "CacheControlScope.PUBLIC" can only be defined once.
Enum value "CacheControlScope.PRIVATE" can only be defined once.
There can be only one directive named "cacheControl".
at assertValidSDL (/node_modules/graphql/validation/validate.js:89:11)
at Object.buildASTSchema (/node_modules/graphql/utilities/buildASTSchema.js:78:34)
at Object.buildSchemaFromTypeDefinitions (/node_modules/graphql-tools/dist/generate/buildSchemaFromTypeDefinitions.js:23:28)
at Object.makeExecutableSchema (/node_modules/graphql-tools/dist/makeExecutableSchema.js:26:29)
at new ApolloServerBase (/node_modules/apollo-server-core/dist/ApolloServer.js:162:43)
at new ApolloServer (/node_modules/apollo-server-express/dist/ApolloServer.js:46:9)
at Module../src/server.js (/dist/server.js:15214:22)
at __webpack_require__ (/dist/server.js:683:30)
at fn (/dist/server.js:60:20)
at Object.0 (/dist/server.js:15261:18)
Referencing this issue: #153 I had to manually add the following to my schema:
enum CacheControlScope {
PUBLIC
PRIVATE
}
directive @cacheControl(
maxAge: Int
scope: CacheControlScope
) on OBJECT | FIELD_DEFINITION
For a period of time this was working without error until recently and I started getting the error above. It happens in both importSchema and the webpack plugin. When I print out the typeDefs on my server I see that it's only declared once. Any help on troubleshooting while I keep looking into this would be appreciated.
The text was updated successfully, but these errors were encountered:
I'm using graphql-import and ApolloServer and I'm running into the following error:
Referencing this issue: #153 I had to manually add the following to my schema:
For a period of time this was working without error until recently and I started getting the error above. It happens in both importSchema and the webpack plugin. When I print out the typeDefs on my server I see that it's only declared once. Any help on troubleshooting while I keep looking into this would be appreciated.
The text was updated successfully, but these errors were encountered: