relay-tools / vscode-apollo-relay

Simple configuration of vscode-apollo for Relay projects.
MIT License
49 stars 13 forks source link

Request textDocument/hover failed. #31

Open Albert-Gao opened 4 years ago

Albert-Gao commented 4 years ago

Directives like @argumentDefinitions won't produce error anymore, thanks!

However, when hovering over @argumentDefinitions, it will trigger an Apollo VSC plugin error like this picture:

image

Am I doing anything wrong, is this expected? I am totally fine with it, just want to make sure I do not miss anything

alloy commented 4 years ago

Thanks for the report, looks like this is caused because of how the argument definition parameters aren't actually static like with normal directives, so presumably the extension is trying to get metadata for amnestying argument that doesn’t exist. Will time-box some time to see if that’s easy to work around.

alloy commented 4 years ago

Yeah that’s what happens, it occurs here in the Apollo language server. Other than perhaps monkey-patching typeInfo at runtime, I don’t see any existing opportunities to making it work.

Going to pass on this for now, but I’ll leave the issue open for if/when somebody wants to pick it up.