Skip to content
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

Schema reuse ver 4 #661

Closed
andrzejbl opened this issue Apr 25, 2023 · 9 comments
Closed

Schema reuse ver 4 #661

andrzejbl opened this issue Apr 25, 2023 · 9 comments

Comments

@andrzejbl
Copy link

Hi,

in the previous version, I've been reusing graphql files across many projects.
for example, I used
libs/pricing/schema.graphql

in many other schemas.
It worked very well so far. After upgrading to v4, projects defined after the project using one file are not seeing this file again.
I'm using a single config file for the whole project.

Is this a bug or there was an intentional change?

@vepanimas
Copy link
Collaborator

@andrzejbl Hi! To be honest, I didn't think about that scenario and haven't tested it for that case 😞. I've implemented the config matching as closely as possible to the https://github.com/kamilkisiela/graphql-config library. Therefore, I need some time to figure out how it works there.

You can try to downgrade a plugin to a 3.4.0 version as a temporary solution, sorry for the inconvenience.

It would be great if you could share the config file you use, of course without any endpoints, credentials, or other sensitive data.

@andrzejbl
Copy link
Author

andrzejbl commented Apr 25, 2023

Here is an example of my config for older version:

   "PhotographerServer": {
      "includes": [
        "./graphql/apps/photographer/src/**/*.graphql",
        "./graphql/libs/organization-offer/**.graphql",
        "./graphql/libs/organization-offer-front/**.graphql",
        "./graphql/libs/upload/*.graphql",
        "./graphql/schema/common.graphql"
       .....
      ]
    },
    "PhotographerClient": {
      "includes": [
        "./projects/photographer-panel/src/app/queries.graphql", <-- frontend queries
        "./graphql/apps/photographer/src/**/*.graphql",
        "./graphql/libs/organization-offer/*.graphql",
        "./graphql/libs/organization-offer-front/*.graphql",
        "./graphql/libs/upload/*.graphql",
        "./graphql/schema/common.graphql"
          ...
      ]
    }

Downgrane solved the problem temporarily. Let me know if I can be of any help.

@vepanimas
Copy link
Collaborator

@andrzejbl What IDE version do you use? I think I fixed it but it would be great if you could try it before the release.

vepanimas added a commit that referenced this issue Apr 25, 2023
@vepanimas vepanimas added this to the 4.0.1 milestone Apr 25, 2023
@andrzejbl
Copy link
Author

Webstorm: Build #WS-231.8109.174, built on March 28, 2023

@vepanimas
Copy link
Collaborator

@andrzejbl Could you please try this recent build including a fix? Does it work for your project setup?

js-graphql-intellij-plugin-4.0.0.zip

@andrzejbl
Copy link
Author

andrzejbl commented Apr 26, 2023 via email

@Kikketer
Copy link

Kikketer commented May 4, 2023

Having the same-ish problem here. None of my graphql files nor ts/js type files recognize my schema anymore as of version 4.0.0. I downgraded to 3.4.0 and things work again out-of-the-box.

For reference I'm in a mono-repo

config 
  schema.graphql
packages
  projectName
    src
      someDirectory
        someFile.ts               << has gql` ` in it
        somegraph.graphql << just your standard graphql file

@reckter
Copy link

reckter commented May 9, 2023

@vepanimas When can we expect the fix to land in the release version?

@vepanimas
Copy link
Collaborator

@reckter We'll release it by the end of the week, we’re testing the build at the moment🤞.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants