keyArgs
with variables
example (see apollographql/apollo-client#7173).
git clone https://github.com/hwillson/ac-issue-7173.git
- Terminal 1:
cd server; npm start
- Terminal 2:
cd client; npm start
- Access: http://localhost:3000/
- Click
Next
once to get a second set of results. - Click
Change fooIds
to update thefooIds
variable, which has been included as part ofkeyArgs
. - The results will re-render, starting from the beginning.
- Check the cache dump on-screen; you will see that 2 separate
ROOT_QUERY
cache keys have been used sincefooIds
is configured as part ofkeyArgs
. When it was updated in #6, a new cache key was created with the newfooIds
value as part of it. - Click next a couple more times, to verify pagination continues to work from this point forward as expected.