apollo icon indicating copy to clipboard operation
apollo copied to clipboard

[Question][Feature Request] - How To update varaibles inside of Studio from mutation response

Open ondrovic opened this issue 4 years ago • 1 comments

Is it possible to update environment variables with items from the result of a mutation?

Example would be you login and a token is generated in a response in the environmental variable tab you would have something like this

{
"token": "<token>"
}

Is there currently a way to update <token> with Response.data.login.token then pass it to the headers? Currently we he have to login and copy paste would be a nice feature if possible.

ondrovic avatar Sep 01 '21 19:09 ondrovic

hi there, wonder if preflight scripts might scratch the same itch?

https://github.com/apollographql/apollo-studio-community/blob/main/preview-docs/PreRequestScripts.md

happy to add your org to the beta if you can share your org id

cheapsteak avatar Sep 03 '21 17:09 cheapsteak