I’d like to see the retry link allow for retries on graphQL errors, not just network ones. Sometimes there are transient 5xx style errors in a GQL resolver.
@RylanH The below link "promotes" graphql errors to real errors and retry link will process them. You must put this link between your http link and your retry link.
new ApolloLink((operation, forward) => {
return forward(operation).map((data) => {
if (data && data.errors && data.errors.length > 0) {
throw new Error('GraphQL Operational Error');
}
return data;
});
}),
Most helpful comment
@RylanH The below link "promotes" graphql errors to real errors and retry link will process them. You must put this link between your http link and your retry link.