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

General "not working" issue #120

Open
bali182 opened this issue Jan 24, 2019 · 7 comments
Open

General "not working" issue #120

bali182 opened this issue Jan 24, 2019 · 7 comments

Comments

@bali182
Copy link

bali182 commented Jan 24, 2019

I'm sorry, I don't know how to name this issue.

I followed the installation steps:

  1. Installed playlyfe/gql:

screen shot 2019-01-24 at 11 03 29

  1. Installed watchman:

screen shot 2019-01-24 at 11 03 51

  1. Installed this plugin in VSCode & restarted the IDE:

screen shot 2019-01-24 at 11 05 08

  1. Added a .graphqlconfig file, which points to a graphql file I'd like to edit:
{
  "schemaPath": "src/schema.gql"
}

What works:

  1. Syntax highlighting works fine:

screen shot 2019-01-24 at 11 08 27

  1. Snippets work fine:

screen shot 2019-01-24 at 11 09 57

What doesn't work:

  1. Autocomplete - only the default token based autocomplete shows up:

screen shot 2019-01-24 at 11 11 04

  1. Linting/error highlighting - I couldn't cause any linting errors

screen shot 2019-01-24 at 11 11 58

  1. Find type - doesn't work

  2. Language server doesnt even seem to be running:

screen shot 2019-01-24 at 11 13 52

Any pointers on how could I make this plugin work?

@kumarharsh
Copy link
Owner

The config file should be named .gqlconfig, not .graphqlconfig

@bali182
Copy link
Author

bali182 commented Jan 24, 2019

Thanks @kumarharsh that got me one step further. Now when I restart the IDE and open a .gql file I get this:
screen shot 2019-01-24 at 11 23 57

But nothing on the output tab seems to contain valuable info. I can see in the Log (extension host) channel (or whatever they call these) that it was trying to start the plugin:

[2019-01-24 11:24:30.816] [exthost] [info] ExtensionService#_doActivateExtension kumar-harsh.graphql-for-vscode {"startup":true,"activationEvent":"workspaceContains:.gqlconfig"}
[2019-01-24 11:24:30.816] [exthost] [info] ExtensionService#loadCommonJSModule /Users/balazs.edes/.vscode/extensions/kumar-harsh.graphql-for-vscode-1.13.0/out/client/extension
[2019-01-24 11:24:30.927] [exthost] [info] eager extensions activated 

But no stacktrace or errors.

@kumarharsh
Copy link
Owner

I think maybe it's not able to talk to watchman. Maybe some permissions issue? Try shutting down watchman (watchman shutdown-server) and close vscode, then restart vscode. The plugin should automatically restart watchman server.

@bali182
Copy link
Author

bali182 commented Jan 24, 2019

Same error after a watchman shutdown-server. Any way I could debug it? I'm not too familiar with the vscode plugin infrastructure.

@tkharuk
Copy link

tkharuk commented Mar 19, 2019

Have the same issue - VSCode for Graphql couldn't start
Neither changing schema nor .gqlconfig have any different effect.

.gqlconfig

{
  "schema": {
    "files": "schema.graphql"
  },
  "query": {
    "files": [{
      "match": "packages/**/*.gql",
      "parser": "QueryParser"
    }, {
      "match": { "include": "packages/**/*.js" },
      "parser": ["EmbeddedQueryParser", { "startTag": "gql`", "endTag": "`" }]
    }]
  }
}

@kumarharsh any ideas on what we can try to resolve this?

@Mayank1791989
Copy link
Collaborator

@TuxujPes The error can happen if schema.graphql file is not present or there is some error in schema.graphql file which is not handled in plugin (Share content of schema.graphql if possible).

To fix issue first check schema.graphql file is present. If the file is present and still error is coming then replace schema.graphql content with below and restart vscode. If everything works fine then you should see error in schema.graphql file Type "xString" not found.

# schema.graphql
type Query {
   name: xString
}

@galvesribeiro
Copy link

I'm having the same issue here using the exactly same versions and tried the shutdown workaround...

In my case, nothing works... Syntax highlight, nothing...

Can anyone shed a light and what that may be?

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

5 participants