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

Laboratory: Query actual graph endpoints #788

Closed
klippx opened this issue Dec 12, 2022 · 3 comments · Fixed by #2680
Closed

Laboratory: Query actual graph endpoints #788

klippx opened this issue Dec 12, 2022 · 3 comments · Fixed by #2680
Assignees
Labels
enhancement New feature or request that adds new things or value to Hive

Comments

@klippx
Copy link

klippx commented Dec 12, 2022

In Laboratory today you can only see mock data based on schema types. That misses the central point for us, we need to see real data.

So for example, I have set up my Hive account with two targets: One for staging and another for production. When I am in Laboratory and write a query, I expect it to be sent to a configured endpoint for that target; such as for the staging target I want the query/variables/headers sent toward the staging gateway.

When I execute a query I want it to be sent to that endpoint and see the result resolving real data. I don't want to look at mock data.

@dotansimha
Copy link
Collaborator

That's a super interesting issue @klippx , thank you for reporting this one.
At the moment we provide a mocked API in the Lab (mainly for exploration and documentation purposes).

I think at the moment we don't really have the gateway URL (we only store service(s) URLs for projects like Federation or Stitching), so we are not able to send the requests to the actual service.
@kamilkisiela do you think we can allow sending the runtime URL (of either the gateway or the single-project endpoint) and then use that in the Lab?

@dotansimha dotansimha added the enhancement New feature or request that adds new things or value to Hive label Dec 12, 2022
@dotansimha
Copy link
Collaborator

An update on this one; we now have the persisted SDL of every schema published, so this makes it easier to have access to the real latest composable schema. This means we are able to use that as introspection. The missing piece is to allow users to specify a runtime URL per target, and then allow to switch between mocked/actual endpoints in the Lab.

@kamilkisiela
Copy link
Owner

I think we can do the following:

  • a form in target's settings to provide an url of a real endpoint and a list of secrets (accessible in GraphiQL - header values)
  • a note on top of GraphiQL: "Connect it with your real GraphQL endpoint" or "Executing operations against real GraphQL API".
  • inject secrets in header's value

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants