graphdoc icon indicating copy to clipboard operation
graphdoc copied to clipboard

What if my endpoint requires an oAuth token?

Open MikeGriffinReborn opened this issue 4 years ago • 3 comments

Is there any way to pass in an oAuth token?

MikeGriffinReborn avatar Jun 17 '20 20:06 MikeGriffinReborn

Same here, i get a 401 when accessing (unauthenticated): graphdoc -e https://vf-api-uat.plantvarieties.eu/graphql -o ./doc/schema I need to pass an x-auth token in the header to browse/fetch the endpoint/schema. Is this good practice (to auth GraphQL schema) ? Anyone has any idea how to browse GraphQL endpoints that require authN ?

andushow avatar Aug 19 '20 17:08 andushow

The Project Readme indicates that you guys can have that sending the -x param:

-x, --header                   HTTP header for request (use with --endpoint). ["Authorization: Token cb8795e7"].

elielsonms avatar Aug 20 '20 18:08 elielsonms

Thanks, it worked!

andushow avatar Aug 21 '20 05:08 andushow