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

[feature]: GraphQL environment variables support and should be shared with REST #2172

Open
1 task done
xpol opened this issue Mar 17, 2022 · 14 comments · May be fixed by #3723
Open
1 task done

[feature]: GraphQL environment variables support and should be shared with REST #2172

xpol opened this issue Mar 17, 2022 · 14 comments · May be fixed by #3723
Labels
feature New feature or request

Comments

@xpol
Copy link

xpol commented Mar 17, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Summary

Add environment variables for GraphQL:

  • in the GraphQL endpoint
  • In the GraphQL variables editor
  • In the GraphQL Headers editor
  • In the GraphQL Authorization editor

And the environment variables should be shared with REST tab.

So that I can first request a REST api to get authorization information, and store tokens and other values in the environment variables, the the GraphQL requests can use those variables.

Why should this be worked on?

Get the GraphQL editor in hoppscotch more user friendly.

@xpol xpol added the feature New feature or request label Mar 17, 2022
@jopijuco
Copy link

jopijuco commented Mar 18, 2022

I would also add that environment variables should be shared with the team like collections. Otherwise, your team collections won't work because the requests are using variables that only you have access.

@xpol
Copy link
Author

xpol commented Mar 19, 2022

Yes, we must allow environments to extend to other environments.

Env1 <--extends-- Env2 <--extends-- Env3

Env1, Env2, Env3 may or may not be at the same level (team, connection, request).

@AndrewBastin
Copy link
Member

We are working on revamping the GraphQL page completely. Should be done by next month hopefully. We will consider this feature at that point.

As for extending, we are brainstorming a UX for request based variables.

@tobychidi-zz
Copy link

tobychidi-zz commented Mar 28, 2022

Yes. Environments should be tied to collections or teams... Also GraphQL and Websockets should be part of collections or part of teams / workspaces and they should support the same Environments and have collections in that workspace / team

Can't switch from Postman yet because of this issue.

So far, Hoppscotch is cool. I would try to contribute as well.

@hiroingk
Copy link

Are there any updates to this feature? It would be so cool if this feature was added.

@whoistobias
Copy link

This is basically the only feature needed before I can totally ditch Postman. Any news on this? What's the best way to help?

@Mautriz
Copy link

Mautriz commented Dec 12, 2022

I'd say that environments should be global (same environments available to REST/graphql/realtime) as:

  • There are usually some web services which have at least 2 of those 3 things
  • Sharing a single config file per environment per team is easier/creates less friction than sharing a config file per environment per service per protocol per team

As for me personally it's an important feature, I'd gladly switch from insomnia to hoppscotch (and promote it to teammates) if it was not for the absence of configs
I'm up to help in case

@camflan
Copy link

camflan commented Apr 11, 2023

Same here, was excited to transition our teams to Hoppscotch from Insomnia and hit this road block soon after setting up our second collection

Any updates?

@wzrdtales
Copy link

@AndrewBastin I guess the original plans have been thrown over?

@wzrdtales
Copy link

Alternatively, if this takes too much time, maybe a good golden path for a fast solution is to do it how postman integrated it, by offering a graphql option on the REST tab for body format.

@azzamsa
Copy link

azzamsa commented Aug 6, 2023

This is the only feature that stops me from fully migrating to hopscotch 😢

@camflan
Copy link

camflan commented Nov 14, 2023

This is the only feature that stops me from fully migrating to hopscotch 😢

same

@p-kuen
Copy link

p-kuen commented Nov 22, 2023

What is the current status of this issue? Are you open for PR's or is there something already in progress?

@Timeraa Timeraa linked a pull request Jan 6, 2024 that will close this issue
10 tasks
@Timeraa
Copy link
Contributor

Timeraa commented Jan 6, 2024

I am currently working on adding this feature! I've been waiting for this to be added for a long time as well as I do like Hoppscotch but this lacking feature really killed my intend to use it. I will be trying to get the GraphQL side of Hoppscotch a bit more polished up as I do intend to use it as my new tool.

Testing this feature on the branch I created would be lovely! Suggestions are welcome as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.