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

SchemaPath outside project root doesn't work #384

Closed
Yohandah opened this issue Sep 8, 2020 · 3 comments
Closed

SchemaPath outside project root doesn't work #384

Yohandah opened this issue Sep 8, 2020 · 3 comments

Comments

@Yohandah
Copy link

Yohandah commented Sep 8, 2020

Describe the bug
It is not possible to reference a schema that's outside of the project's root.

"schemaPath": "../backend/schema.graphql",

To Reproduce

I have a NestJS server and a frontend in Angular that consumes the GraphQL api with an Apollo Server. My frontend uses graphql-tag with gql'query MyQuery() { }' and the extension cannot autocomplete and says "unknown field" and the query is in red.

  1. Create a backend and generate a schema.graphql
  2. Create a frondend and a .graphqlconfig then try to reference your backend's schema

Expected behavior
We should be able to ../../ outside the project.

Additional context
It works when I open the folder with the two projects inside but I don't want to because then my IDE doesn't work properly since boths projects have different tslint, typescript version, prettier, etc

--folder
----frontend
----backend
------schema.graphql
@Leksat
Copy link

Leksat commented Jan 18, 2022

I met the same limitation and was able to workaround it with a symbolic link. Hacky, but works 🙂

@joelworsham
Copy link

Same issue. Probably a common pattern. Add support please?

@vepanimas
Copy link
Collaborator

@joelworsham Hi! As mentioned in issue #668, probably, this one will also be resolved. It would be great if you could give an EAP a try!

Schemas defined in parent directories should work in the upcoming 2023.3 release, you can try an already published EAP to check if the issue is solved for you.

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