Skip to content

Error Policies #205

Open
Open
@mdnjustin

Description

@mdnjustin

I was wondering if anyone has had this issue, where error responses from GraphQL come back and get saved into cache. I would like to use the option "none" from below
Unless it's already there and I don't know where it is.

none: This is the default policy to match how Apollo Client 1.0 worked. Any GraphQL Errors are treated the same as network errors and any data is ignored from the response.
ignore: Ignore allows you to read any data that is returned alongside GraphQL Errors, but doesn’t save the errors or report them to your UI.
all: Using the all policy is the best way to notify your users of potential issues while still showing as much data as possible from your server. It saves both data and errors into the Apollo Cache so your UI can use them.

I tried working around by trying to subclass ApolloClient, GraphQLResponse but neither of these are subclass-able.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dynamic operationsenhancementIssues outlining new things we want to do or things that will make our lives as devs easier

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions