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

v14 tutorial doesn't match v14 reality #4242

Open
trumbitta opened this issue Mar 10, 2023 · 7 comments
Open

v14 tutorial doesn't match v14 reality #4242

trumbitta opened this issue Mar 10, 2023 · 7 comments

Comments

@trumbitta
Copy link

This code https://relay.dev/docs/tutorial/queries-1/#relay-and-the-type-system is supposed to type data.topStory, but after applying it we discover data.topStory doesn't exist.

data.topStories exists in its stead, but I don't know how what's happening because I'm following the tutorial to learn about Relay 😬

@ushironoko
Copy link

@trumbitta
Hi! I encountered the same phenomenon myself.
It seems to be caused by relay-compiler failing to start watch mode and GraphQL not updating the types.

If I recompile manually, it works correctly.

npm run relay

I couldn't quite figure out why the compiler is failing to start watch mode, but I am getting the following error message.

[relay] thread 'main' panicked at 'Cannot run relay in watch mode if `watchman` is not available (or explicitly disabled).' , crates/relay-bin/src/main.rs:284:9
[relay] note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[relay] npm run watch-relay exited with code 101

I hope it gets better soon, as it is a great library.

@remz99
Copy link

remz99 commented Mar 16, 2023

I encountered the same issue as @trumbitta when I started the tutorial. I managed to resolve the issue by installing watchman.

@ushironoko
Copy link

I installed watchman and it works. Also, Relay GraphQL's VSCode Extension now works and can jump to the fragment definition. Thanks! @remz99

@danguilherme
Copy link

I also had this problem, and installing watchman also fixed it. Just a heads up that I had to install it with Homebrew. I tried installing it with npm (both local and global) and it did not work.

@nmcmaster
Copy link

This problem still exists as originally described.

@flex-mookeun
Copy link

Encountered same issue here. Seems the tutorial document should be mentioning this.

@clalexni
Copy link

clalexni commented Oct 15, 2023

in extension setting, I added this line (on m1 mac)

"relay.pathToRelay": "./node_modules/relay-compiler/macos-arm64/relay"

and installed watchman using brew install watchman

Was finally able to click on fragment spread and go to where the fragment is defined!! :D

Screenshot 2023-10-14 at 11 27 09 PM

facebook-github-bot pushed a commit that referenced this issue Feb 24, 2024
… the tutorial (#4620)

Summary:
Address issues like #4301 and #4242

Add instructions for installing watchman to the tutorial.

Testing:
<img width="1308" alt="image" src="https://github.com/facebook/relay/assets/3454734/035b07db-30d0-4867-9246-7c400d8af3bf">
<img width="1323" alt="image" src="https://github.com/facebook/relay/assets/3454734/23d0e393-4144-49e5-8b95-9d306a98e033">

Pull Request resolved: #4620

Reviewed By: tyao1

Differential Revision: D54124996

Pulled By: monicatang

fbshipit-source-id: 2bb51eeca2dd7a9c7a937b7aec20bd2c5aca9920
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

7 participants