You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
What steps may we take to reproduce the behavior?
See "expected behaviour"
The text was updated successfully, but these errors were encountered:
sreuter
changed the title
Can't detect token expiry
Can't distinguish expired tokens from empty responses
Apr 30, 2018
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"
The text was updated successfully, but these errors were encountered: