Skip to content

Elaborate Immediate Mutation Updates / Create section #358

Closed
@ghost

Description

Is your feature request related to a problem? Please describe.
I was working on a project where I needed to trigger re-fetching the list of resource instances (e.g. order items) and force-update of all the components displaying such a list in cases when a) the new resource instance was created and b) some other resource instance (e.g. account preference) changed.

I've tried to follow the instructions given in the Immediate Mutation Updates (update and create sections), but didn't manage to come up with a reliable solution, most likely because of misuse and misunderstanding of the APIs.

Describe the solution you'd like
It would be great to have more elaborated documentation that would show examples of how to properly trigger re-fetching of the list of resources once a new instance is created, and also do so once some other resource changed.

Could it be done using useInvalidator()?

Describe alternatives you've considered
Add a section that outlines some common usage patterns.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions