graphql-request
graphql-request copied to clipboard
unable to pass request headers to client.rawRequest
The docs state that both client.request and client.rawRequest can be supplied with a headers object as third parameter. I'm using typescript and I have version 3.3.0 installed and both methods do not accept a third parameter.
client.rawRequest(query, variables, headers); // Expected 1-2 arguments, but got 3.
client.request(query, variables, headers); // Expected 1-2 arguments, but got 3.
@timojokinen I had the same issue, to solve it I runned npm add graphql-request graphql
.
AFAIK this feature is released with 3.4.0. #33
Se example passing-custom-header-per-request
However, using { request, gql }
directly instead of { GraphQLClient }
is not implemented.