graphql-inspector icon indicating copy to clipboard operation
graphql-inspector copied to clipboard

Support comparing two local files

Open paambaati opened this issue 2 years ago • 4 comments

Is your feature request related to a problem? Please describe.

We use a code generator to generate our GraphQL schema on the fly, and never commit it into VCS. It is simply passed to AWS AppSync to generate the endpoints and the schema. We also don't serve the .graphql file via endpoint, as we don't need introspection – all consumers of our API are internal.

In this case, we are not able to use the GitHub action, as it lets us compare the schema only with a branch or an endpoint.

Describe the solution you'd like

Another option for the GitHub action that lets us provide a physical file for the "before" schema.

Describe alternatives you've considered

  1. Add support for this feature via a PR – but not attempting this right now for a lack of time.

Additional context

N/A

paambaati avatar Dec 21 '21 06:12 paambaati

We have a similar setup, using GraphQL Nexus to generate a GraphQL schema, which is not committed to version control. We do enable introspection, so retrieving the "before" schema by endpoint shouldn't be a problem, but our "after" schema needs to be retrieved via the local workspace.

@kamilkisiela, is there a reason why workspace is always cleared out in pull request contexts? On glance, this seems to be causing our issue.

namoscato avatar Apr 23 '22 20:04 namoscato

@B2o5T, @TuvalSimha, do you have any thoughts here? I'm happy to help contribute to support this use case.

namoscato avatar Dec 24 '22 01:12 namoscato

I have the same need - two local schema files I'd like to compare in the GitHub action, because my endpoint requires authentication (AWS AppSync). I can fetch the before schema and save it to a file.

revmischa avatar May 09 '23 20:05 revmischa

@enisdenjo, do you have any thoughts?

It would be great to understand the status of the seemingly experimental pull request context and what plans there are to more fully support the use case. As mentioned previously, I would be happy to help contribute but really need context on the current state.

namoscato avatar Sep 02 '23 14:09 namoscato