-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preflight script in Laboratory when querying API #3612
Comments
This is important to my org as well. |
Can you explain your optimal flow? What would be needed to retrieve the headers? I assume that we could allow configuring an HTTP endpoint that is called with a secret configured within the targets settings, that will return the headers that should be attached to the request to be sent. In addition to that we could also provide information about the to be sent GraphQL Request (operation, variables, headers, etc.). We hesitate to allow running custom JavaScript for preflight scripts as it introduces additional challenges for security and self-hosting. |
I'd like to have a username and password input appear in the lab when this feature is enabled. Having a separate endpoint that is called to perform the authentication would be good. |
I think our use-case would be easiest to achieve with a Preflight script. I understand your concern but wouldn't it be up to the client whether or not they want to use the script option or not? |
Great that you added a way to call your own API in Laboratory
We (and probably many others) have a need to add headers for auth purposes. This can be done manually but it is very teadious to do every time plus and would be a blocker for using this feature among our devs on a wider scale forcing us to build and maintain our own Explorer.
Apollo have preflight script capability in their Explorer which can be used to automate this and make the DX good. It would be awesome if you could add something similar or another solution to this problem so that we can use Laboratory as our Explorer.
The text was updated successfully, but these errors were encountered: