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

v4 not picking up local json schema file #655

Closed arturkin closed 1 year ago

arturkin commented 1 year ago

Describe the bug Hey, thanks for all the hard work, this plugin is really awesome! Plugin just updated for me to v4, and I'm not able to use it anymore - not picking up any types. I've updated config file to the use new structure

To Reproduce v3 working config .graphqlconfig

{
  "schemaPath": "../graphql-schema.json",
  "documents": "src/**/*.graphql",
}

v4 config (non working) graphql.config.yml

schema: ../graphql-schema.json
documents: 'src/**/*.graphql'

Was the json schema support dropped? I can see mostly .graphql examples in docs now.

vepanimas commented 1 year ago

@arturkin hi! Can you try moving graphql-schema.json to the directory where the config file is located? This might solve the problem. JSON schemas should work, but they work differently now, maybe it's an issue with relative paths.

schema: ./graphql-schema.json
documents: 'src/**/*.graphql'

It's strange that it worked before because we have had a similar issue for a long time #615.

arturkin commented 1 year ago

Yes! that worked, thank you!