-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Monorepo/multi-project support #31
Comments
The short answer is that this is quite complicated. See my reply in #27 This extra level of config affects all features. Error highlighting, completion, find usages, file watches etc. and the coordination between the plugin and the language service. |
At some point I might have some time to look into that myself. Is https://github.com/graphcool/graphql-config then the starting point or would it be https://github.com/jimkyndemeyer/js-graphql-language-service? (My guess would be that this should just touch the language service and this plugin, but I could be wrong of course) |
I referenced graphql-config because they're working on standardising configs, and multi-project support would be another facet that they would need to document -- if this plugin was to integrate with the spec. So no code changes are needed there initially for this issue. Several tasks come to mind: Configuration
Langugage Service:
Plugin:
Probably forgot something. /Jim. |
Another idea just came to mind. I assume that you don't need to work with GraphQL in multiple modules at the same time. In that case, this issue becomes: "How to easily switch the "file" property in graphql.config.json and save it. Then we need the following with just a single graphql.config.json:
If this is a viable approach, I'd drastically reduce the scope of this issue. Only downside is that only a single schema.json is active at a time. |
Please see graphql-hive/graphql-config#16 for the continuation of this. |
Thank you for adding
graphene
support @jimkyndemeyer. There would be one more step needed so we could use the plugin. And again, not sure if this repo is the right one to raise the issue, but it is the entry point.Anyway, we are having a mono-repo structure (following babel's naming scheme: https://github.com/babel/babel/blob/master/doc/design/monorepo.md), i.e. we are having multiple projects in the same repo that all are independent and have their own graphql endpoints. It would be great if within an IntelliJ project we can have mutliple
graphql.config.json
files. So we could have e.g.project1/frontend/graphql.config.json
,project2/frontend/graphql.config.json
, etc. and all js files their respective frontend folder would pick up the right config (which in our case would point to a file-path).I know the other way we could do that is by just having one config in the root directory and then setting up an introspection endpoint for each server, but that would be quite a bit more complicated given our infrastructure and security measures, so unfortunately probably not a realistic option.
Not sure of course how difficult this is, but I would really love us being able to use these plugins.
The text was updated successfully, but these errors were encountered: