-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
Doesn't work with Webstorm/Jetbrains #80
Comments
This unfortunately isn't an issue we can accept as such and fix, because it's not fixable from our end. I'd appreciate someone reaching out to the IntelliJ/Webstorm team about this, but the crucial thing here is that for the TS LSP plugin to work:
Otherwise only type inference is going to work, provided a typings file has been generated. We're planning to supplement this functionality with a CLI as well: #76 |
I got it working with Webstorm yesterday. Did you enable the project TS env in the settings? |
@krokhale is that anything we can document or add a sample configuration file for (like we have for VSCode) |
@JoviDeCroock Nothing major to document, but essentially similar to vscode, one needs to switch the typescript from the bundled version to the one in: The option can be found in:
Make sure the Typescript language service is turned on. |
@krokhale If we do decide to document some of this this might be quite major if Webstorm doesn't prompt you to do this — or at least, we do seem to be getting questions about it rather often |
@kitten Well yeah, unfortunately it does not work out of the box in Webstorm and probably not the ideal experience compared to how it works in vscode. Generating a |
Hi everyone, the graphql-env.d.ts does get generated in webstorm. but code completion does not work. Even when you enable the graphql plugin. I've opened a ticket yesterday: https://youtrack.jetbrains.com/issue/WEB-65740#focus=Comments-27-9296748.0-0 |
Btw. it does work with the graphql plugin, if you have a local graph.schema file (Like in the pokemon example), the graphql plugin automatically used that file. It does not work with a remote schema file however. |
@Jonne that could be an error surfaced in your |
@JoviDeCroock As far as I can judge, I don't see any errors in the tsserver logs. I can send them to you if you would like to have a look? |
Closing due to inactivity. It's very unclear to me whether TypeScript plugins are now working properly in Jetbrains' IDEs or Codestorm/Webstorm, or whether there's an active workaround to enable them properly (similar to how VSCode requires an additional step) If someone knows the answer to this, please let me know. If someone reads this and this still doesn't work, the CLI should always be the best fallback for situations where your editor/IDE isn't set up to run a TypeScript language server including TS plugin support. |
I mean, just putting this out there, that has nothing to do with |
Yes, sorry, not trying to reopen this issue, just confirming that it's not an isolated case, and vscode experience here is indeed superior to jetbrains. Probably need to poke Jetbrain devs about this on the issue that @Jonne created above |
the query return types are working correctly, and if I manually add wrong query then webstorm would tell me that it's incorrect, just the autocomplete doesn't work, as if graphql plugin can't detect this as graphql query unless I name the file with .graphql extension (for non gql.tada use case), then autocomplete works fine. So ts plugin/server works fine as far as I can see |
Yep, sorry, I didn't actually get around to posting in the Jetbrains thread — I also think they might have multiple issues regarding this that match 🤔 The main things to check btw are:
If all those are working, then an editor is compatible and set up correctly to use the TypeScript plugin. |
Describe the bug
It would be nice to be able to generate typings in cli
https://www.reddit.com/r/graphql/comments/19921i6/gqltada_a_graphql_parser_written_in_typescript/
Reproduction
No response
gql.tada version
v1.2.1
Validations
The text was updated successfully, but these errors were encountered: