Skip to content
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

be able to pass in custom headers #14

Open
hinling-ihealthlabs opened this issue Mar 31, 2017 · 3 comments
Open

be able to pass in custom headers #14

hinling-ihealthlabs opened this issue Mar 31, 2017 · 3 comments

Comments

@hinling-ihealthlabs
Copy link

our graphql requires a couple of custom headers for authentication. Would be nice to be able to pass in custom headers through _ref.

@msmfsd
Copy link

msmfsd commented Apr 13, 2018

you can pass auth:

const {tester} = require('graphql-tester')
const myAuthToken = 'HFJGHGFJHFGJ456456456456'

const test = tester({
  url: 'http://localhost:3000/graphql',
  contentType: 'application/json',
  authorization: myAuthToken,
})

@mateusrdp
Copy link

mateusrdp commented Sep 14, 2018

but can you pass other stuff? Like
`const {tester} = require('graphql-tester')
const myAuthToken = 'HFJGHGFJHFGJ456456456456'
const mySmthElse = 'somethingElse'

const test = tester({
url: 'http://localhost:3000/graphql',
contentType: 'application/json',
authorization: myAuthToken,
x-smth-else: mySmthElse,
})`

@msmfsd
Copy link

msmfsd commented Sep 18, 2018

@mateusrdp not sure, try it and see or pm repo owner

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

No branches or pull requests

3 participants