Skip to content
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

Allow to manipulate outgoing http (graphql) request in Laboratory's Preflight Script #6269

Open
kamilkisiela opened this issue Jan 7, 2025 · 4 comments · May be fixed by #6378
Open

Allow to manipulate outgoing http (graphql) request in Laboratory's Preflight Script #6269

kamilkisiela opened this issue Jan 7, 2025 · 4 comments · May be fixed by #6378
Assignees
Labels
enhancement New feature or request that adds new things or value to Hive

Comments

@kamilkisiela
Copy link
Contributor

kamilkisiela commented Jan 7, 2025

Some kind of API to manipulate the headers at least, as step one.
It's not meant to modify the input and textarea elements of GraphiQL.

lab.request.headers.set(...)
@jasonkuhrt jasonkuhrt self-assigned this Jan 16, 2025
@jasonkuhrt
Copy link
Member

jasonkuhrt commented Jan 16, 2025

Task Progress Update:

I have found the laboratory-preflight-script.cy.ts file. In it I see a reference to lab like:

setEditorScript(`lab.environment.set('my-test', "TROLOLOL")`);

My current understanding is that the referenced lab variable there is an instance of the thing we want to enhance.

@kamilkisiela
Copy link
Contributor Author

Yes, the code for it

packages/web/app/src/lib/preflight-sandbox

@kamilkisiela
Copy link
Contributor Author

There's a Worker <-> IFrame <-> GraphiQL, and a lot of messages being sent between them.

@jasonkuhrt
Copy link
Member

jasonkuhrt commented Jan 16, 2025

IIUC this enhancement will be user facing, lab being something a user can use in https://the-guild.dev/graphql/hive/docs/dashboard/laboratory/preflight-scripts.

@jasonkuhrt jasonkuhrt added the enhancement New feature or request that adds new things or value to Hive label Jan 16, 2025
@jasonkuhrt jasonkuhrt linked a pull request Jan 16, 2025 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request that adds new things or value to Hive
Development

Successfully merging a pull request may close this issue.

2 participants