Skip to content

Docs: add fragment arguments example for refetchable fragments #82

Description

@XiNiHa

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions