Closed
Description
Describe the bug
Regression: Custom graphql directives missing from introspection json in v1.12.0+
To Reproduce
Steps to reproduce the behavior:
https://codesandbox.io/s/awesome-dewdney-bv2wc
- My GraphQL schema:
directive @testDirective on FIELD_DEFINITION
type Query {
hello: String @testDirective
}
- My GraphQL operations:
# Put your operations here
- My
codegen.yml
config file:
overwrite: true
schema: ${GRAPHQL_URL:http://0.0.0.0:4000/}
generates:
./graphql.schema.json:
plugins:
- introspection
diff between 1.11.2 and 1.13.3:
./graphql.schema.json
@@ -9,11 +9,11 @@
{
"kind": "OBJECT",
"name": "Query",
- "description": "",
+ "description": null,
"fields": [
{
"name": "hello",
- "description": "",
+ "description": null,
"args": [],
"type": {
"kind": "SCALAR",
@@ -848,20 +848,20 @@
{
"kind": "ENUM",
"name": "CacheControlScope",
- "description": "",
+ "description": null,
"fields": null,
"inputFields": null,
"interfaces": null,
"enumValues": [
{
"name": "PUBLIC",
- "description": "",
+ "description": null,
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "PRIVATE",
- "description": "",
+ "description": null,
"isDeprecated": false,
"deprecationReason": null
}
@@ -877,59 +877,10 @@
"interfaces": null,
"enumValues": null,
"possibleTypes": null
- },
- {
- "kind": "SCALAR",
- "name": "Int",
- "description": "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",
- "fields": null,
- "inputFields": null,
- "interfaces": null,
- "enumValues": null,
- "possibleTypes": null
}
],
"directives": [
{
- "name": "testDirective",
- "description": "",
- "locations": [
- "FIELD_DEFINITION"
- ],
- "args": []
- },
- {
- "name": "cacheControl",
- "description": "",
- "locations": [
- "FIELD_DEFINITION",
- "OBJECT",
- "INTERFACE"
- ],
- "args": [
- {
- "name": "maxAge",
- "description": "",
- "type": {
- "kind": "SCALAR",
- "name": "Int",
- "ofType": null
- },
- "defaultValue": null
- },
- {
- "name": "scope",
- "description": "",
- "type": {
- "kind": "ENUM",
- "name": "CacheControlScope",
- "ofType": null
- },
- "defaultValue": null
- }
- ]
- },
- {
"name": "skip",
"description": "Directs the executor to skip this field or fragment when the `if` argument is true.",
"locations": [
Expected behavior
custom graphql directives (testDirective
) back where there should be
Environment:
- OS:
@graphql-codegen/...
:- NodeJS:
Additional context