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

Unable to get it working with relay modern #134

Open
brettjashford opened this issue May 3, 2019 · 2 comments
Open

Unable to get it working with relay modern #134

brettjashford opened this issue May 3, 2019 · 2 comments

Comments

@brettjashford
Copy link

i believe i've set everything up according to the docs but the plugin doesn't seem to be working and i'm seeing an error in the vs code dev tools.

my .gqlconfig:

{
  schema: {
    files: 'graphql.schema.graphql',
  },
  query: {
    files: [
      {
        match: { include: '**/*.jsx' },
        parser: [ 'EmbeddedQueryParser', { startTag: 'graphql`', endTag: '`' } ]
      }
    ]
  }
}

i've tried with schemas in json as well as type declaration format. i've tried with and without relay: true.

after restarting the plugin, i get the following output

[Info  - 3:09:39 PM] NODE_PATH value is: /Users/brett/.config/yarn/global/node_modules
[Info  - 3:09:39 PM] Module '@playlyfe/gql' loaded from: /Users/brett/.config/yarn/global/node_modules/@playlyfe/gql/lib/index.js
[vscode] File extensions registered:  [ 'json', 'jsx' ]
[Watch established (gqlSchemaFiles)] 
	basePath: /Users/brett/projects/app-dealer-mc 
	RelativePath: undefined 
	Files: "graphql.schema.json"
[Watch established (gqlQueryFiles-0)] 
	basePath: /Users/brett/projects/app-dealer-mc 
	RelativePath: undefined 
	Files: {
  "include": "**/*.jsx"
}

along with this error in the vs code dev tools

Trace: BAD uri lacks scheme, falling back to file-scheme.
	at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:114:656
	at new f (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:114:729)
	at new p (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:116:930)
	at Function.parse (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:116:279)
	at nullConverter (/Users/brett/.vscode/extensions/kumar-harsh.graphql-for-vscode-1.13.1/node_modules/vscode-languageclient/lib/protocolConverter.js:22:47)
	at Object.asUri (/Users/brett/.vscode/extensions/kumar-harsh.graphql-for-vscode-1.13.1/node_modules/vscode-languageclient/lib/protocolConverter.js:25:16)
	at LanguageClient.handleDiagnostics (/Users/brett/.vscode/extensions/kumar-harsh.graphql-for-vscode-1.13.1/node_modules/vscode-languageclient/lib/client.js:2119:29)
	at initialize.connection.initialize.then.connection.onDiagnostics.params (/Users/brett/.vscode/extensions/kumar-harsh.graphql-for-vscode-1.13.1/node_modules/vscode-languageclient/lib/client.js:1994:53)
	at handleNotification (/Users/brett/.vscode/extensions/kumar-harsh.graphql-for-vscode-1.13.1/node_modules/vscode-jsonrpc/lib/main.js:489:43)
	at processMessageQueue (/Users/brett/.vscode/extensions/kumar-harsh.graphql-for-vscode-1.13.1/node_modules/vscode-jsonrpc/lib/main.js:260:17)
	at Immediate.setImmediate [as _onImmediate] (/Users/brett/.vscode/extensions/kumar-harsh.graphql-for-vscode-1.13.1/node_modules/vscode-jsonrpc/lib/main.js:247:13)
	at runCallback (timers.js:696:18)
	at tryOnImmediate (timers.js:667:5)
	at processImmediate (timers.js:649:5)

syntax highlighting works and the GQL icon is white with a "GraphQL language server is running" tooltip on hover, but autocomplete doesn't work and i'm getting "unknown type" and "fragment ... is never used" errors on everything.

Screen Shot 2019-05-03 at 3 29 54 PM

thanks in advance for any help!

@kumarharsh
Copy link
Owner

Working on it. Should be out soon 🙂

@brettjashford
Copy link
Author

nice, thanks! 🙏

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