Skip to content

Example: Demonstrate issue with client resolvers and server edges #332

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jonreading81
Copy link

@jonreading81 jonreading81 commented Apr 11, 2025

Description

This Example is to demonstrate an issue with client resolvers with server edges.

This example has taken the Todos example and updated Relay to the latest release and amended it to use a client resolver which points to a server edge, in this case they point to the existing Todo node.

The issue which it demonstrates is that the client edge queries are not made because it incorrectly determines that the required data is already in the store.

In this example the issue can be avoided by:

  • Removing the todos query in TodoApp, in this case the records will no longer be in the store and the edge queries are made.
  • Moving the data required from the fragment within the @waterfall directive. It appears that the data within the fragment is non interrogated to see if it is required.

@facebook-github-bot
Copy link

Hi @jonreading81!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@jonreading81 jonreading81 force-pushed the jr-repro-resolvers-issue branch from da822a1 to bd2d6f0 Compare April 14, 2025 08:20
chore: add comments

chore: update comments

chore: rename to clientTodoList

docs: update comment

doc: move comment on to one line
@jonreading81 jonreading81 changed the title wip: demonstrate resolvers issue Example: Demonstrate issue with client resolvers and server edges Apr 14, 2025
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

Successfully merging this pull request may close these issues.

2 participants