JetBrains / js-graphql-intellij-plugin

GraphQL language support for WebStorm, IntelliJ IDEA and other IDEs based on the IntelliJ Platform.
https://jimkyndemeyer.github.io/js-graphql-intellij-plugin/
MIT License
879 stars 97 forks source link

Feature request: Support for StepZen directives #646

Open cherylli opened 1 year ago

cherylli commented 1 year ago

They are coming up as invalid. 

For example, in a .graphql file (I already have the graphql plugin installed)

@materializer image

https://stepzen.com/docs/custom-graphql-directives/directives#type-system-directives

mlabisi commented 1 year ago

I was able to solve this by manually creating a stepzen.graphql file and adding the custom scalars, inputs, and directives

Short example (using just the directives I need for my schema)

directive @rest (endpoint: String!, configuration: String, resultroot: String, setters: [Setter], headers: [Header]) on FIELD_DEFINITION
directive @graphql (endpoint: String!, configuration: String, headers: [Header], prefix: Prefix) on FIELD_DEFINITION
directive @sdl (files: [String]) on SCHEMA

input Header {
    name: String
    value: String
}

input Setter {
    field: String
    path: String
}

input Prefix {
    value: String
    includeRootOperations: Boolean
}