Skip to content

Unable to get it working with relay modern #134

@brettjashford

Description

@brettjashford

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions