graphql-tester
graphql-tester copied to clipboard
be able to pass in custom headers
our graphql requires a couple of custom headers for authentication. Would be nice to be able to pass in custom headers through _ref.
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,
})
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, })`
@mateusrdp not sure, try it and see or pm repo owner