Describe the bug
Version com.graphql-java:graphql-java:21.3
I faced that JSON schema introspection sometimes returns the same directive many times. This breaks code generation in API clients and many tools like Altair.
It happens both if the directive definition is single in sources, and when there are copies of it.
{
"data": {
"__schema": {
"queryType": {
"name": "Query"
},
"mutationType": null,
"subscriptionType": null,
"types": [],
"directives": [
{
"name": "exampleDirective",
"description": null,
"locations": [
"FIELD_DEFINITION"
],
"args": []
},
{
"name": "exampleDirective",
"description": null,
"locations": [
"FIELD_DEFINITION"
],
"args": []
}
]
}
}
}
In my production project I have 1 directive, but get 2 copies in JSON introspection.
- What can be the reason for this?
- Did you see similar situations?
- Suppose that it is incorrect behaviour
To Reproduce
- Example code: https://github.com/paullarionov/test-graphql-java
- Fetch of JSON schema:
./gradlew downloadApolloSchema --endpoint="http://localhost:8080/graphql" --schema="schema.json"
- Example of broken schema: https://github.com/paullarionov/test-graphql-java/blob/main/schema.json#L1022-L1037
Describe the bug
Version com.graphql-java:graphql-java:21.3
I faced that JSON schema introspection sometimes returns the same directive many times. This breaks code generation in API clients and many tools like Altair.
It happens both if the directive definition is single in sources, and when there are copies of it.
In my production project I have 1 directive, but get 2 copies in JSON introspection.
To Reproduce