Skip to content

Update without making network calls #10

@AminZibayi

Description

@AminZibayi

Hello There
In the Todo App example, it is not possible neither to add a todo to the todo list nor updating an existing todo without making any additional network calls because updateQueries completely replaces old data.

        setState(old => ({
          ...old,
          [queryHash]: {
            ...old[queryHash],
            data,
          },
        }))

We may request a large amount of data (e.g. to display using a virtualized table) and we may also want the users to be able to edit records or add new ones; in this case, refetchQueries requires fetching a big amount of data just because of partial changes, (the server responds with updated record)
Have any plans on adding any features handling this process?
A temporary solution is to store fetched data in a React state and update it after mutations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions