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've split out my more common types into the atimintestschema.graphqls file, my thought was these get resolved in AtiSchema.php, but it doesn't seem to find them.
When the Test Event extension is enabled, those types are then not found, and i get the following error:
The website encountered an unexpected error. Please try again later.
GraphQL\Error\Error: Type "Language" not found in document. in GraphQL\Utils\BuildSchema::GraphQL\Utils\{closure}() (line 149 of /opt/vendor/webonyx/graphql-php/src/Utils/BuildSchema.php).
GraphQL\Utils\ASTDefinitionBuilder->internalBuildType('Language', Object) (Line: 194)
GraphQL\Utils\ASTDefinitionBuilder->buildType(Object) (Line: 182)
GraphQL\Utils\ASTDefinitionBuilder->buildWrappedType(Object) (Line: 155)
....
I have attached my module thats more or less a min reproduction hopefully it provides some clues.
The text was updated successfully, but these errors were encountered:
Thanks for creating a support request! I'm very hesitant of downloading zip files from the internet, so to make it easier to help you, try reducing the scope of what you're doing to as few lines as possible which still reproduce the error and paste those in code blocks here. Or create a gist to share if you feel like you still have too much code put in an issue :D As an upside of reducing the amount of code you're reporting on, you may find what code is causing the problem and solve the issue yourself.
Thanks for posting the Gist! That makes it easy to find the cause :)
Your issue is using the ComposableSchema class which overrides getSchemaDefinition to
/** * {@inheritdoc} */protectedfunctiongetSchemaDefinition() {
return<<<GQL type Schema { query: Query } type QueryGQL;
}
It does this instead of the base schema plugin class which will load the schema file with the <id>.graphqls name that you're expecting.
The ComposableSchema is really for situations where you don't want to define any base schema yourself but just select extensions to load. In your case (where your extensions are also specifying which schema they're extending) you want to use SdlSchemaPluginBase :)
I've split out my more common types into the atimintestschema.graphqls file, my thought was these get resolved in AtiSchema.php, but it doesn't seem to find them.
When the Test Event extension is enabled, those types are then not found, and i get the following error:
I have attached my module thats more or less a min reproduction hopefully it provides some clues.
The text was updated successfully, but these errors were encountered: