js-graphql-intellij-plugin
js-graphql-intellij-plugin copied to clipboard
Some directives are not included in the generated GraphQL Schema
Describe the bug Some directives are not included in the generated GraphQL Schema
To Reproduce
- Go to https://github.com/ExpediaGroup/graphql-kotlin/pull/1350
- Run the
./gradlew :ktor-server:run
- Fetch the GraphQL schema using js-graphql-intellij-plugin
Expected behavior
"This GraphQL directive allows to add constraints to the GraphQL Schema - https://www.apollographql.com/blog/backend/validation/graphql-validation-using-directives/"
directive @constraint(format: String!, maxLength: Int!, minLength: Int!, pattern: String!) on VARIABLE_DEFINITION | FIELD_DEFINITION | INPUT_OBJECT
input DirectiveInput {
deviceId: String! @constraint(minLength: 8, maxLength: 16)
email: String! @constraint(format: "email")
}
Actual behavior
With the graphql-kotlin
library, I get the constraints inside the generated schema.
With js-graphql-intellij-plugin I don't get them
"This GraphQL directive allows to add constraints to the GraphQL Schema - https://www.apollographql.com/blog/backend/validation/graphql-validation-using-directives/"
directive @constraint(format: String!, maxLength: Int!, minLength: Int!, pattern: String!) on VARIABLE_DEFINITION | FIELD_DEFINITION | INPUT_OBJECT
input DirectiveInput {
deviceId: String!
email: String!
}
Screenshots If applicable, add screenshots to help explain your problem.
Version and Environment Details Operation system: MacOS latest IDE name and version: IntelliJ IDEA 2021.3.1 Plugin version: 3.1.2
Additional context
See https://github.com/ExpediaGroup/graphql-kotlin/pull/1350
Seems like the directives are not part of the introspection... https://github.com/graphql/graphql-spec/issues/300