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

[vim] No completion nor errors #41

Open
mogelbrod opened this issue Jan 17, 2019 · 0 comments
Open

[vim] No completion nor errors #41

mogelbrod opened this issue Jan 17, 2019 · 0 comments

Comments

@mogelbrod
Copy link

ts-graphql-plugin version: 57d27a0 (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 
    }
  }
`)
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

1 participant