rover icon indicating copy to clipboard operation
rover copied to clipboard

feat: add `--header/H` to `rover dev` for introspection requests

Open EverlastingBugstopper opened this issue 2 years ago • 6 comments

some subgraphs require authentication before they will respond to introspection queries. rover graph introspect and rover subgraph introspect both allow multiple --header/-H arguments to be passed. We should provide that same functionality for rover dev whenever a --url is passed and a --schema is not passed. we should use clap to make the schema and header arguments mutually exclusive.

EverlastingBugstopper avatar Jan 18 '23 16:01 EverlastingBugstopper

Additionally it would be nice to have this for the rover supergraph compose command, to add a header for introspection requests.

mvrahden avatar Jan 24 '23 17:01 mvrahden

Additionally it would be nice to have this for the rover supergraph compose command, to add a header for introspection requests.

Is there any progress with this? seems weird that rover subgraph introspect is able to get --header but supergraph compose can't

noamski avatar Mar 22 '23 13:03 noamski

This would help us out too for local development. Right now we have to run two rover dev commands and generate a "throw away" schema file to add a new subgraph to the dev session.

nimhawk avatar Mar 28 '23 13:03 nimhawk

Same request here. It feels a bit inconsistent atm. Would also be nice to have the header options for the supergraph compose config yaml.

platzhersh avatar Apr 19 '23 19:04 platzhersh

You can use introspection_headers for rover supergraph compose and you can now use that same supergraph.yaml file with introspection_headers for rover dev to get the same behavior.

This is a different mode of rover dev that connects multiple subgraphs at once, so I think we still want the --header option for single-subgraph sessions, but the supergraph method does function as a workaround for now.

dbanty avatar Jul 05 '23 18:07 dbanty

You can use introspection_headers for rover supergraph compose and you can now use that same supergraph.yaml file with introspection_headers for rover dev to get the same behavior.

This is a different mode of rover dev that connects multiple subgraphs at once, so I think we still want the --header option for single-subgraph sessions, but the supergraph method does function as a workaround for now.

Hello! I have protected each of my subgraphs with different router password and now I would like to update my supergraph-config.yaml file to be able to introspect protected subgaraphs by setting headers based on your suggestion, when running rover supergraph compose

I was trying to do something like this: image

I have even tried giving the header name "Authorization" but unfortunately that didn't work either. Is there something wrong in the sample I have provided?

MajcenT avatar Nov 15 '23 09:11 MajcenT