Skip to content

Return local-only fields in subscription responses  #11238

@Narretz

Description

@Narretz

Right now, if you use @client in gql subscription response, the field is never populated.

This is probably because subscription responses aren't cached like queries, even though individual types are cached.

However, this is extremely counter intuitive. A subscription response isn't that different from a query response. InMemoryCache should populate the local only fields once after the data is received.

Otherwise it should be clearly stated in the docs that this is not possible, or apollo client should throw if a subscription gql document contains the @client directive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions