Closed xxx closed 1 year ago
@xxx Hello! I have a few questions regarding your GraphQL project. Does it work as expected with .graphqlconfig in the latest update (4.0.0), or only in the previous version?
Can you provide more information about your project structure? How are the files separated between schemas? The usage of exclude: '*'
seems a bit odd. Why is it necessary?
Additionally, could you try using this code snippet to see if it works for your project setup?
projects:
DoubleLoop:
schema: schema.graphql
Linear-GraphQL:
schema: linear-schema.graphql
documents: ['**/app/services/api/linear_api.rb']
The code should associate all SDLs from schema.graphql
with the DoubleLoop project, and all SDLs from linear-schema.graphql
and operations from **/app/services/api/linear_api.rb
with the Linear-GraphQL project. Any other operations in non-matching files will be associated with the first project implicitly, which is DoubleLoop in this case. Is this what you need?
Hello - thank you for responding.
I can confirm that the .graphqlconfig
works correctly with 4.0.0.
As far as the project structure goes, it's a standard Rails project. We just happen to be interacting with the Linear API, and we want that specific file to be checked against their schema, while every other file is checked against ours (i.e. exactly what you mentioned above.)
The snippet above does do exactly what I'm after. Thanks!
The exclude '*'
was there just because with everything else, it was needed. It was during a 'try anything at all to see if it works' scenario when I was first setting it up last year.
Heya, thanks for this plugin.
After updating to 4.0.0, our gql documents were no longer being linked to the schema. After adding a
documents
field tographql.config.yml
, they are correctly seen, but we also track the Linear API schema in our graphql config, and now the files that are included in that schema are no longer seen. Without thedocuments
field on our main schema, these are seen as expected.To Reproduce
with this config, the 2 files excluded in the
DoubleLoop
schema no longer get picked up by theLinear-GraphQL
schema.with the previous version
.graphqlconfig
:everything works as expected.
Expected behavior I expect that adding the
documents
field on our main schema will not invalidate files included with the other, or that the migrated configuration would just work.Version and Environment Details Operation system: Ubuntu 22.04.2 IDE name and version: RubyMine 2023.1 Plugin version: 4.0.0