Skip to content

Should cache updates be broadcast to readquery? #8914

Closed
@rossm6

Description

I have a component which includes this line -

const profileData = client.readQuery({ query: GET_USER_PROFILE });

The component is not re-rendered though when the parent container does update the cache with the query result.

If I replace this line with the following though it works -

const { data } = useQuery(GET_USER_PROFILE, { fetchPolicy: 'cache-only', nextFetchPolicy: 'cache-only' });

Shouldn't cache updates be broadcast to readQuery as well?

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