-
Notifications
You must be signed in to change notification settings - Fork 95
Add support for Framework-specific Schema directives, e.g. Prisma #144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi Phil. The plugin is showing this as an error since it has no way to determine the validity of the directives. It usually determines which directives are available using a configured schema or introspection against an endpoint. But in this case, since you're working on defining your schema, it would have to know the built-in directives given the framework you're using. I'll keep this issue around as a possible enhancement. For now it's a limitation in the plugin. Best regards, |
The 2.0 alpha release allow you to declare framework-specific directives as you would any other directive. See 2.0.0-alpha-2 if you'd like to try it and help test it. Edit: Directives placed on the schema types and fields appear to be reported as invalid locations and don't show up in completions. Expect this to be fixed in an upcoming alpha. |
@jimkyndemeyer |
@yaquawa You declare your framework directives in a directive @myFrameworkDirective on OBJECT | FIELD_DEFINITION See http://facebook.github.io/graphql/June2018/#sec-Type-System.Directives for reference. The plugin should provide completion for you. |
@jimkyndemeyer |
Hi guys,
I have a error saying: "Unknown directive @unique", "Unknow directive @default". This directives are used on Prisma.
That's normal or is really a bug?
Thanks
Below is the image of the errors:

The text was updated successfully, but these errors were encountered: