What OS and OS version are you experiencing the issue(s) on?
iOS
What is the expected behavior?
I wanted to implement a custom fetch for my Apollo httpLink to handle expired or soon to be expired idTokens. Unfortunately, whenever a request to graph.cool is made with an expired token, there's nothing distinguishable in the payload I get back that I could use to determine if the request failed because of an expired token.
For the following query, using an expired idToken...
const userQuery = gql`
query {
user {
id,
name
}
}
`;
I get this as result...
{ data: { user: null } }
In this case, I wouldn't be able to tell if the access token expired, or if the user didn't get created before using the createUser() mutation.
What is the actual behavior?
I'd like to be able to distinguish (token expiry) errors from empty responses
Issue type:
I am submitting:
Issue Questions:
What OS and OS version are you experiencing the issue(s) on?
iOS
What is the expected behavior?
I wanted to implement a custom fetch for my Apollo httpLink to handle expired or soon to be expired idTokens. Unfortunately, whenever a request to graph.cool is made with an expired token, there's nothing distinguishable in the payload I get back that I could use to determine if the request failed because of an expired token.
For the following query, using an expired idToken...
I get this as result...
{ data: { user: null } }
In this case, I wouldn't be able to tell if the access token expired, or if the user didn't get created before using the createUser() mutation.
What is the actual behavior?
I'd like to be able to distinguish (token expiry) errors from empty responses
What steps may we take to reproduce the behavior?
See "expected behaviour"