graphman icon indicating copy to clipboard operation
graphman copied to clipboard

feat: support collection scoped variables & headers

Open nohehf opened this issue 1 year ago • 7 comments

GraphMan should be able to take auth and headers as parameters. Those parameters as well as URLs should be sent in the environment variables. The process could be to load .env files to generate different environment, or via the CLI.

nohehf avatar Jul 09 '22 06:07 nohehf

yes! being able to include authentication headers would be fantastic, all our graphql endpoints are behind authentication checks

swangy avatar Jul 17 '22 00:07 swangy

What would you be interested in / what auth type do you use (tokens, API keys...) ?

nohehf avatar Jul 17 '22 13:07 nohehf

Thanks for considering this feature! We use JWT tokens for authentication so honestly, being able to pass key:value pairs in the header would work well for our workflow.

Using a .env for dev/staging/prod environments to populate the header value would be fantastic.

swangy avatar Jul 17 '22 21:07 swangy

Also, being able to generate a key:value pair (Authorization:Bearer ) in each query header in the resulting postman collection

swangy avatar Jul 17 '22 21:07 swangy

Hey @swangy, while full env support isn't available right now, bearer token auth is now supported, see #16. You can use it with: deno run [...] <URL> --auth=AUTHORIZATION_TOKEN !

nohehf avatar Jul 26 '22 07:07 nohehf

This is fantastic thanks very much!

you accepting PRs? looking over deno to see what i can contribute

swangy avatar Jul 27 '22 14:07 swangy

@swangy

We accept PR, feel free to contribute :)

nullswan avatar Jul 27 '22 15:07 nullswan