graphql
graphql copied to clipboard
feat: add `WithHeader` & `WithCookie`
can set http client's headers and cookies
cli := NewClient(
"url",
httpClient,
graphql.WithCookie("cookieName", "cookieVal"),
graphql.WithHeader("headerName", "headerVal"),
)
fully backwards-compatible.
Will this be merged in anytime soon? Would be specifically useful for authorization.
@IamFlowZ you can try my fork github.com/Laisky/graphql, fully compatible with shurcool/graphql.
https://github.com/Laisky/graphql
This is a great feature, but I would also prefer it if these were on a new method like NewClientWithOptions or something.
Not a 1:1 replacement, but https://github.com/shurcooL/graphql/pull/73 might also enable this use case
When is this going to be merged?
will this be merged ?