Skip to content

Conversation

itsjoeoui
Copy link
Contributor

@itsjoeoui itsjoeoui commented May 5, 2025

https://relay.dev/docs/tutorial/mutations-updates/#step-4--modify-the-updatable-data

This step of the tutorial is currently giving us type errors.

CleanShot 2025-05-05 at 18 09 58@2x

This is because we are missing the generic type parameter.

Note that this will also require us to upstream the relay dependencies in the example to the latest v19: relayjs/relay-examples#333

After that, our tutorial will be working properly with no type error!

@itsjoeoui itsjoeoui changed the title fix: missing generic type parameter fix: missing generic type parameter for mutation tutorial example May 5, 2025
@itsjoeoui itsjoeoui changed the title fix: missing generic type parameter for mutation tutorial example add missing generic type parameter for mutation tutorial example May 5, 2025
@captbaritone
Copy link
Contributor

Thanks! This looks great. Do you mind also updating the v19 docs as well? https://github.com/facebook/relay/blob/main/website/versioned_docs/version-v19.0.0/tutorial/mutations-updates.md

@itsjoeoui
Copy link
Contributor Author

Thanks! This looks great. Do you mind also updating the v19 docs as well? https://github.com/facebook/relay/blob/main/website/versioned_docs/version-v19.0.0/tutorial/mutations-updates.md

Of course, will do now!

@itsjoeoui
Copy link
Contributor Author

Done, please let me know if we need anything else :) @captbaritone

@facebook-github-bot
Copy link
Contributor

@captbaritone has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@itsjoeoui
Copy link
Contributor Author

btw it would be great to merge this together with relayjs/relay-examples#333, I have tested the example with this change and it works great :)

@facebook-github-bot
Copy link
Contributor

@captbaritone merged this pull request in f25a9d1.

@itsjoeoui
Copy link
Contributor Author

itsjoeoui commented May 8, 2025

CleanShot_2025-05-07_at_23.13.43.mp4

I noticed something weird. On fresh load, typescript LSP complains about this typing here, but if I remove the code and add the same code back, it does not complain anymore 🤔

Edit: I think I found a fix, will raise a PR soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants