-
-
Notifications
You must be signed in to change notification settings - Fork 605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider QueryResult.rawFetchResult #371
Comments
Hi guys, you can't do something like javascript apollo client do? const afterwareLink = new ApolloLink((operation, forward) => {
return forward(operation).map(response => {
const context = operation.getContext();
const { response: { headers } } = context;
if (headers) {
const refreshToken = headers.get('x-refresh-token');
if (refreshToken) {
localStorage.setItem('refreshToken', refreshToken);
}
}
return response;
});
}); finally you concatenate all const httpLinkWithMiddleware = afterwareLink.concat(middlewareLink.concat(httpLink)); It would be easier and consistent. |
I think Another example would be Rest Link where a single operation may become a set of HTTP requests – there the meaning of |
yeah, I think it's best to leave solutions like this to userland. @gepd we do have custom link support, for example |
Occasionally a user will want a simple way to access protocol-level data, such as headers and cookies (#335) without having to write a custom link. Rather than adding more protocol-level fields to the
QueryResult
, we should consider adding an "escape hatch" to getting ther rawFetchResult
The text was updated successfully, but these errors were encountered: