graphiql: TypeError: Cannot read property 'schemaPath' of undefined
Hi,
I cannot make this run on Windows 😠I am receiving this error:
(node:6500) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[Error - 14:13:40] Request textDocument/hover failed.
Message: Request textDocument/hover failed with message: Cannot read property 'projectName' of undefined
Code: -32603
This is my .graphqlconfig.yml
projects:
app:
schemaPath: "src/data/yoga/schema.graphql"
includes: ["src/**/*.graphql"]
extensions:
endpoints:
default: "http://localhost:4000"
codegen:
- generator: prisma-binding
language: typescript
output:
binding: src/data/generated/api.ts
prisma:
schemaPath: "src/data/generated/prisma.graphql"
includes: ["src/**/*.graphql"]
extensions:
prisma: src/data/prisma/prisma.yml
codegen:
- generator: prisma-binding
language: typescript
output:
binding: src/data/generated/prisma.ts
All Works well on MAC with this setup
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 22
- Comments: 36 (5 by maintainers)
Wow, the issue is still persists
Facing this issue as well using vscode on MacOS.
It appears that the project key must be equal to the folder name in vscode. For example:
Is there at least any workaround?
Just installed plugin. Same error
MacOS
Any news? Aparently
v3.0.0-alpha.13of graphql-config is out which resolves this issue. Apollo vsconfig extension eats up all my CPU unfortunately, so I was hoping on using prisma vsconfig, which does not work at all currently.Same problem on osx:
I get the output:
I never made this work. Using the Apollo version now. It does not have the go to definition for server defined schemas but otherwise works nicely.
@tomitrescak I actually did create a repo for exactly this purpose, see here: https://github.com/prismagraphql/vscode-graphql/issues/21#issuecomment-410504763
I’d be keen to know if this repo is working for you and if so which branch (local typescript version or vscode version)
Yes I am. That said, I’m pretty sure think this was related to an old graphql version. Since I updated the graphql version locally as well as globally the error has dissapeared and im getting linting and auto completion for .graphql files but not yet in gql tags. See the gql tag issue as I provided a repository for reproduction.
@tomitrescak What version of graphql or graphql-cli do you have installed globally/locally?