Escape-Technologies / graphman

Quikly scaffold a postman collection for a GraphQL API. Compatible with Postman & Insomnia.
MIT License
240 stars 12 forks source link

feat: support collection scoped variables & headers #4

Closed nohehf closed 1 year ago

nohehf commented 2 years ago

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.

swangy commented 2 years ago

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

nohehf commented 2 years ago

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

swangy commented 2 years ago

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 commented 2 years ago

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

nohehf commented 1 year ago

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 !

swangy commented 1 year ago

This is fantastic thanks very much!

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

nullswan commented 1 year ago

@swangy

We accept PR, feel free to contribute :)

nohehf commented 1 year ago

Closing this as v1.2.1 enables all headers to be passed.