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

TypeScript auto-import completions are not shown (e.g., in VS Code) when this plugin is enabled #38

Open
sqs opened this issue Jul 19, 2018 · 0 comments

Comments

@sqs
Copy link

sqs commented Jul 19, 2018

When ts-graphql-plugin was in our tsconfig.json, it made TypeScript auto-import completions no longer work. (I.e., when you start to type part of an identifier, it can show things that, upon completion, result in a new import statement at the top of the file. Those no longer were shown in the menu, only global TS lib defs and file-local scope items were shown.) This could be a problem specific to auto-imports, or a more general problem where this plugin prevented TypeScript from analyzing the project scope.

This problem started occurring only a few days ago for me, and I can't figure out what changed, so I accept that this bug report is short on details and repro steps. I will let you know if anyone else on our team has more info to share.

Thank you for making this great plugin, btw! It is otherwise awesome. We will continue to look into this on our end at @sourcegraph and (hopefully) submit a PR with a fix. If you have any pointers, that would be super helpful.

Details

Version: ts-graphql-plugin@1.1.2 from npm
TypeScript: typescript@2.9.2
Running in VS Code 1.25.1 on Linux (although my teammates on Mac also reported the same issue)

tsconfig.json plugin entry:

{
  "name": "ts-graphql-plugin",
  "schema": "graphqlschema.json",
  "tag": "gql"
}

The graphqlschema.json file is confirmed to be valid JSON.

this._logger in the code did not print any errors (or any messages other than Build client schema.). getCompletionAtPosition did not throw any exceptions (when I added a try...catch around it).

The tsserver.log contained no error logs related to this plugin (or any others).

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