Skip to content

Commit

Permalink
Allow apollo-boost to support headers and credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
Ray Zane committed Feb 28, 2018
1 parent eb78ab9 commit d792e36
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/apollo-boost/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export { gql, InMemoryCache, HttpLink };
export interface PresetConfig {
request?: (operation: Operation) => Promise<void>;
uri?: string;
credentials?: string;
headers?: any;
fetchOptions?: HttpLink.Options;
clientState?: ClientStateConfig;
onError?: ErrorLink.ErrorHandler;
Expand Down Expand Up @@ -76,7 +78,8 @@ export default class DefaultClient<TCache> extends ApolloClient<TCache> {
const httpLink = new HttpLink({
uri: (config && config.uri) || '/graphql',
fetchOptions: (config && config.fetchOptions) || {},
credentials: 'same-origin',
credentials: (config && config.credentials) || 'same-origin',
headers: (config && config.headers) || {},
});

const link = ApolloLink.from([
Expand Down

0 comments on commit d792e36

Please sign in to comment.