-
Notifications
You must be signed in to change notification settings - Fork 95
Use .graphqlconfig
File
#125
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 Martin. The config file format this plugin uses predates the graphql-config project, but I had discussions with the graphcool team when they began their work. While I do see the value in converging on a single format, there are some important differences that makes adoption quite complex for this plugin. The biggest difference is that this plugin relies on a single schema per IntelliJ/WebStorm project, whereas graphql-config allows multiple. Like other language tooling on the IntelliJ platform, the project structure inside the IDE is what powers the various language features in this plugin. Again this difffers from graphql-config that uses glob patterns. The bottom line is that adopting graphql-config cuts across all major features in this plugin. This includes schema resolution, completion, error highlighting, go to definition, and find usages. Realistically, I don't see where I could find the time to begin working on this in addition to maintaining the plugin. Right now #121 is the highest priority to ensure that the plugin keeps working as expected as the GraphQL spec evolves. /Jim |
@jimkyndemeyer hey. Is there any help I can give? If you will guide me a bit where to watch I may be able to help out with adopting |
Hi Andrii. Thanks for offering to help. Given the scale of the change, I don't think it's realistic to work on this unless you are very experienced with the IntellIJ Platform SDK. But, I've been thinking about an interim solution that can sync compatible properties from a See Let me know if you have any questions. /Jim |
@jimkyndemeyer I don't have any experience with it TBH :) |
@RIP21 Glad it worked out. I've deleted our comments that were somewhat unrelated to this issue. |
So it won't ever be possible to have multiple schemas? I have a project with 2 directories that have different schemas, but don't want to have to open webstorm twice |
The 2.0 alpha makes it possible to have multiple schemas in a single project using IntelliJ/WebStorm "Scopes". You can configure them for the project in the IDE Settings dialog. With that in place it should become possible to automatically sync the include/exclude rules in a watched graphql-config file such that the plugin language features respect said rules. See 2.0.0-alpha-2 if you'd like to try it and help test it. /cc @schickling |
it's quite strange but the plugin is listed here as supported this format https://github.com/prismagraphql/graphql-config |
@fetis Note the "(pending)" at the end of the sentence. |
omg. how reads them all? :) |
would you consider moving to https://github.com/graphql/graphql-language-service/ as well? |
I have, and I've been in talks with both Prisma and Facebook engineers. It really comes down to trade-offs. While graphql-language-service does offer some advantages from shared tooling, it has the following drawbacks:
What really made the difference for v2 is the great work being done on graphql-java, which enables this plugin to get features such as validation and GraphQL SDL tools directly from the Java ecosystem. |
oh, so you're moving away from the other javascript language server as well? |
I'm not sure how graphql-language-service is structured, but would it be possible to wrap graphql-language-service using the nashorn JavaScript engine to remove the dependency of a nodejs environment? |
I doubt it supports running stuff written for node.js |
Closing as v2 alpha now uses .graphqlconfig files and can migrate the legacy graphql.config.json files automatically. |
There's a de-facto standard for graphql metadata, graphql-config. Can this be used instead of the current format?
The text was updated successfully, but these errors were encountered: