Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

credentials option not working in apollo-link-batch-http #509

Closed
Morantron opened this issue Feb 20, 2018 · 3 comments
Closed

credentials option not working in apollo-link-batch-http #509

Morantron opened this issue Feb 20, 2018 · 3 comments
Labels

Comments

@Morantron
Copy link

Intended outcome: credentials option should work when using apollo-link-batch-http. If graphql is behind basic http auth for example, credentials: "same-origin" should propagate credentials.

Actual outcome: Credentials are not being propagate, getting a HTTP 401 response code.

How to reproduce the issue:

See repo https://github.com/Morantron/apollo-link-batch-http-credentials-bug

@evans
Copy link
Contributor

evans commented Feb 20, 2018

We just published a new version of apollo-link-batch-http. Can you confirm the issue is still present?

@evans evans added the bug label Feb 20, 2018
@Morantron
Copy link
Author

Awesome! It's fixed now on 1.1.0 version, thanks! 🎉 🙌

@mshwery
Copy link

mshwery commented Apr 12, 2018

This issue is still occurring (or had a regression) in apollo-link-batch-http@1.2.1. Using configuration according to the docs:

  new BatchHttpLink({
    uri,
    credentials: 'same-origin',
    headers: {
      accept: 'application/json'
    }
  })

Neither the credentials value nor the headers object are respected.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants