graphql / vscode-graphql

MIGRATED: VSCode GraphQL extension (autocompletion, go-to definition, syntax highlighting)
https://marketplace.visualstudio.com/items?itemName=Prisma.vscode-graphql
MIT License
555 stars 71 forks source link

Getting errors on local schema file with custom built directives #31

Closed andres-gr closed 6 years ago

andres-gr commented 6 years ago

I have a custom directive declared in my local schema file, and it is throwing validation errors when used in this file.

[GraphQL: Validation] Unknown directive "withAuth"

screen shot 2018-06-19 at 11 46 36 am

Maybe it's a bug?

Maybe we can have an option in the settings for the extension to declare our own directives or maybe to ignore such errors.

divyenduz commented 6 years ago

@andres-gr : Thanks for reporting the issue, I think that extension is not activated for you for some reason as the directive syntax highlighting is not working.

I was not able to reproduce this and it works for me.

Do you see a plug symbol with graphql in your status bar? This signifies that extension is in play.

screen shot 2018-06-25 at 2 39 38 pm

If yes, can you please share a sample repository where this behavior can be observed.

Thanks!

andres-gr commented 6 years ago

@divyenduz thanks for the feedback, I guess I did have something wrong in my .graphqlconfig file as it is now working after doing some changes to that file.

I guess I can close this issue.

johannpinson commented 6 years ago

Hello @divyenduz

I got the same bug, even if the plugin is running well capture d ecran 2018-07-18 a 15 53 34

Is the plugin works only with Schema directives (and not directiveResolvers ?) My actual code follow this example: https://github.com/LawJolla/prisma-auth0-example

Thanks,

steebchen commented 6 years ago

I have the same issue. The output tab in VS Code showed some weird errors, and I realized it's because of using a project name with a hyphen:

projects:
  my-project:
    [...]

It works fine for me now.