-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[apollo-boost] Ignores fetchOptions.credentials
#3265
Comments
You can manually configure the client using the sample below: import { InMemoryCache } from 'apollo-cache-inmemory';
import { ApolloClient } from 'apollo-client';
import { HttpLink } from 'apollo-link-http';
const client = new ApolloClient({
cache: new InMemoryCache(),
link: new HttpLink({
credentials: 'include',
uri: GRAPHQL_URI,
}),
}); |
I have the same problem. |
Same here. |
const client = new ApolloClient({
cache: new InMemoryCache(),
uri: 'http://localhost:4000/graphql',
request: async operation => {
operation.setContext({
fetchOptions: {
credentials: 'include'
}
});
}
}); Here is my solution. |
Why does the author not give priority to this bug? |
@alexgorbatchev @haflinger thank you! Spent a lite too mutch time before I found this issue. Two days I'm not getting back 😅 |
whew- thank you for this - just spent the last hour trying to find out why cookies were not being sent :) |
I think this is the fix: #3387 |
I'm hitting this bug as well where the client I've constructed using I'm using |
Hi all - this has been fixed by #3098, and has been merged in. It will be included in our next release (this upcoming Tuesday, June 12th). Thanks! |
@hwillson I am using Using Appllo boost doesn't work, but apollo-client works as normal
|
Intended outcome:
Have credential being included with GraphQL request across different domains.
Actual outcome:
Credentials aren't included.
How to reproduce the issue:
Version
Credentials value is hardcoded over here
https://github.com/apollographql/apollo-client/blob/master/packages/apollo-boost/src/index.ts#L77
I submitted a PR at #3264
The text was updated successfully, but these errors were encountered: