facebook / relay

Relay is a JavaScript framework for building data-driven React applications.
https://relay.dev
MIT License
18.41k stars 1.83k forks source link

Relay extension not working in 2.4.0 #4788

Closed MrJackWilson closed 2 months ago

MrJackWilson commented 2 months ago

I'm receiving the following error in the LSP logs when hovering over any GraphQL code in my project:

{"jsonrpc":"2.0","id":11,"error":{"code":-32001,"message":"Request Canceled"}}
[Error - 12:30:18 PM] Request textDocument/hover failed.
  Message: Request Canceled
  Code: -32001

I have relay-compiler 14.1.0 installed and the latest version (2.4.0) of the relay extension. I do not have any other GraphQL extensions installed. My LSP logs are in debug mode but the above information is all I get. I've tried restarting relay through the VSCode command and I've tried restarting VSCode.

itamark commented 2 months ago

Hey - just curious - is the relay extension server running? Can you try running Relay: Restart VSCode Extension Server

MrJackWilson commented 2 months ago

Hey, I don't have that command in the palette. Only:

> Relay: Restart
> Relay: Start compiler
> Relay: Stop compiler
itamark commented 2 months ago

Got it - thanks.

Do you have this in your VSCode Outputs? Or not that, either.

Screenshot 2024-09-09 at 10 17 50
MrJackWilson commented 2 months ago

Yes, that's where I got the error message above from. I had the logs set to Debug.

itamark commented 2 months ago

I've noticed you're using an old version of the compiler (14.1.0) with the latest version of the extension. Would you mind trying to upgrade the compiler to v 18.0.0?

tobias-tengler commented 2 months ago

Are you using Windows? Your issue sounds a lot like this issue I filed when I was still using Windows: https://github.com/facebook/relay/issues/3918 I fixed it as part of v15, so @itamark's recommendation of upgrading should probably fix your issue (and is a good thing in general) :)

MrJackWilson commented 2 months ago

I've upgraded to the latest relay-compiler and react-relay etc and this has solved the issue with the extension. Thanks a lot for the help!