Problem
The Refetchable Fragments section currently uses a hard-coded field argument (posts(first: 5)) and calls refetch({}). It does not show how a refetchable fragment can declare and receive fragment arguments.
Although fragment variables are documented later in the guide, that example is not connected to createRefetchableFragment, so parameterized refetch usage is unclear.
Suggested update
Extend the refetchable fragment example to demonstrate:
- declaring an argument with
@argumentDefinitions
- passing its initial value with
@arguments at the fragment spread
- supplying an updated value when calling
refetch(...)
- briefly explaining how the fragment reference's arguments and refetch variables interact
This would give users a complete example of using fragment arguments with a refetchable fragment.
Problem
The Refetchable Fragments section currently uses a hard-coded field argument (
posts(first: 5)) and callsrefetch({}). It does not show how a refetchable fragment can declare and receive fragment arguments.Although fragment variables are documented later in the guide, that example is not connected to
createRefetchableFragment, so parameterized refetch usage is unclear.Suggested update
Extend the refetchable fragment example to demonstrate:
@argumentDefinitions@argumentsat the fragment spreadrefetch(...)This would give users a complete example of using fragment arguments with a refetchable fragment.