ts-graphql-plugin
ts-graphql-plugin copied to clipboard
[vim] No completion nor errors
ts-graphql-plugin version: 57d27a035b3ac1d9c66d5d79ea1f44984f3695cc (latest commit built via npm run compile
and then npm linked to global node_modules)
tsserver: 3.0.1 (/usr/local/bin/tsserver)
I'm using youcompleteme to manage tsserver and am successfully getting completion for regular typescript. I don't get anything from this plugin however. The plugin doesn't report any errors, and appears to successfully parse the ./gql-schema.json
containing the result of a regular introspection query. After the initial parsing it doesn't log anything else however.
tsconfig.json
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"allowJs": true,
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"downlevelIteration": false,
"experimentalDecorators": true,
"suppressImplicitAnyIndexErrors": true,
"lib": [
"es2015",
"es2016",
"es2017",
"dom"
],
"plugins": [
{
"name": "ts-graphql-plugin",
"schema": "./gql-schema.json",
"tag": "gql"
}
]
},
"include": [
"app"
],
"exclude": [
"node_modules"
]
}
tsserver logs
Info 16 [17:4:27.426] Enabling plugin ts-graphql-plugin from candidate paths: /usr/local/lib/node_modules/typescript/lib/tsserver.js/../../..
Info 17 [17:4:27.427] Loading ts-graphql-plugin from /usr/local/lib/node_modules/typescript/lib/tsserver.js/../../.. (resolved to /usr/local/lib/node_modules/node_modules)
Info 18 [17:4:28.437] [ts-graphql-plugin] config: {"name":"ts-graphql-plugin","schema":"./gql-schema.json","tag":"gql"}
Info 19 [17:4:28.438] [ts-graphql-plugin] Read schema from {REDACTED}/gql-schema.json
Info 20 [17:4:28.484] [ts-graphql-plugin] Build client schema.
Info 21 [17:4:28.485] Plugin validation succeded
...
Example code
const gql = x => x
// No completion whatsoever when writing the contents below:
console.log(gql`
query {
me {
...on User {
name
}
...on
}
}
`)