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

not working when used with golang-graphql #127

Open
akashbdj opened this issue Mar 11, 2019 · 4 comments
Open

not working when used with golang-graphql #127

akashbdj opened this issue Mar 11, 2019 · 4 comments

Comments

@akashbdj
Copy link

Hi,

I'm trying to use this extension in golang-graphql project. It doesn't work as expected. Also, I'm seeing this issue on vscode output tab:

Screen Shot 2019-03-11 at 7 18 43 PM

What's working: Syntax Highlighting
What's not working: Go to definition, linting, etc.

Since this is a golang project, I don't have package.json. So I installed @playlyfe/gql as a global package and then pointed to it. "graphqlForVSCode.nodePath": "/usr/local/lib/node_modules"

Here's what the .gqlconfig looks like:

{
  schema: {
    files: "./**/*.gql"
  }
}

What should I do to make it work?

Thanks for your time,
Akash

@kumarharsh
Copy link
Owner

Can you post a link to the golang-graphql project? I'll have a look

@akashbdj
Copy link
Author

akashbdj commented Mar 11, 2019

Hi @kumarharsh,

Thanks for quick response. I can't share the project; it's an internal tool.
Here's what we are using: https://github.com/graph-gophers/graphql-go

Project structure looks like:

cmd/
    main.go
resolvers/
    x.go
    y.go
schema/
    query.gql
    mutation.gql
    types/
        a.gql
        b.gql
.gqlconfig

What's surprising here is: extension worked for a minute. I was able to click on types and it took me to the definition. I was also able to see the linting errors. But it stopped working; i didn't change anything.

Let me know if you need any other information. Thanks!

@kumarharsh
Copy link
Owner

@akashbdj I suspect it's something to do with watchman - try shutting down the watchman server and then open vscode again - do watchman shutdown-server, and then just reload your vscode window via Reload Window which will cause the plugin to get reinitialized and kick-start watchman automatically.

@akashbdj
Copy link
Author

I already tried it after looking at other issues. I also tried updating watchman, it doesn't work in either case.

This is the message i'm seeing in vscode output console:

[Info  - 4:35:13 PM] NODE_PATH value is: /usr/local/lib/node_modules
[Info  - 4:35:14 PM] Module '@playlyfe/gql' loaded from: /usr/local/lib/node_modules/@playlyfe/gql/lib/index.js

Also, it's red indicating some sort of an error.
Screen Shot 2019-03-12 at 4 36 45 PM

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

No branches or pull requests

2 participants