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
What happened:
When I try to build the GraphQL documentation using Spectaql, the build fails during the GraphQL schema validation. I will attach the error trace below.
Error: Cannot extend type "Query" because it is not defined.
Cannot extend type "Mutation" because it is not defined. Did you mean "Annotation" or "Invitation"?
Cannot extend type "Subscription" because it is not defined.
Unknown type "Query".
Unknown type "Mutation". Did you mean "Annotation" or "Invitation"?
Unknown type "Subscription".
at assertValidSDL (/opt/homebrew/lib/node_modules/spectaql/node_modules/graphql/validation/validate.js:135:11)
at buildASTSchema (/opt/homebrew/lib/node_modules/spectaql/node_modules/graphql/utilities/buildASTSchema.js:44:34)
at makeExecutableSchema (/opt/homebrew/lib/node_modules/spectaql/node_modules/@graphql-tools/schema/cjs/makeExecutableSchema.js:73:47)
at loadSchemaFromSDLFile (/opt/homebrew/lib/node_modules/spectaql/dist/spectaql/graphql-loaders.js:112:49)
at buildSchemas (/opt/homebrew/lib/node_modules/spectaql/dist/spectaql/build-schemas.js:52:47)
at run (/opt/homebrew/lib/node_modules/spectaql/dist/spectaql/index.js:58:78)
at loadData (/opt/homebrew/lib/node_modules/spectaql/dist/index.js:566:10)
at run (/opt/homebrew/lib/node_modules/spectaql/dist/index.js:339:65)
at Object.<anonymous> (/opt/homebrew/lib/node_modules/spectaql/bin/spectaql.js:7:1)
at Module._compile (node:internal/modules/cjs/loader:1504:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1588:10)
at Module.load (node:internal/modules/cjs/loader:1282:32)
at Module._load (node:internal/modules/cjs/loader:1098:12)
at TracingChannel.traceSync (node:diagnostics_channel:315:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:215:24)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:158:5)
at node:internal/main/run_main_module:30:49
According to the GraphQL JavaScript documentation, a GraphQL schema must include root types (queries, mutations, and subscriptions). Therefore, I suggest changing one of the existing operators in the Chaoscenter GraphQL server schema to a root type.
What you expected to happen:
I expected the GraphQL documentation to build successfully without any validation errors.
Where can this issue be corrected? (optional)
It would be good to change the extended operation types in the chaos_infrastructure.graphqls file to root types.
How to reproduce it (as minimally and precisely as possible):
What happened:
When I try to build the GraphQL documentation using Spectaql, the build fails during the GraphQL schema validation. I will attach the error trace below.
According to the GraphQL JavaScript documentation, a GraphQL schema must include root types (queries, mutations, and subscriptions). Therefore, I suggest changing one of the existing operators in the Chaoscenter GraphQL server schema to a root type.
What you expected to happen:
I expected the GraphQL documentation to build successfully without any validation errors.
Where can this issue be corrected? (optional)
It would be good to change the extended operation types in the
chaos_infrastructure.graphqls
file to root types.How to reproduce it (as minimally and precisely as possible):
npm install -g spectaql # OR yarn global add spectaql
The text was updated successfully, but these errors were encountered: