Closed Braunson closed 1 year ago
I regenerated the schema and it seems to work now.
Glad to know everything is working @Braunson. I double checked the library to make sure there's no holes around directives and everything is ok.
The error message you shared appears when using a directive that has not been declared in the schema, for example:
type ExampleType {
newField: String
oldField: String @rename(reason: "newField")
}
Here it would throw Error: Unknown directive "@rename"
. The fix is to declare the directive as part of the schema:
directive @rename(to: String = "") on FIELD_DEFINITION | ENUM_VALUE
type ExampleType {
newField: String
oldField: String @rename(reason: "newField")
}
When running
npx docusaurus docs:generate:graphql
I'm getting the error:I'm using lighthouse-php and the graphql directory has each type in a different file, i.e.
enums.graphql
,inputs.graphql
,queries.graphql
,directives.graphql
, etc.