Support reading schema from workspace #2549
Open
+345
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR modifies the Github Action. The desired change is to support reading the new schema from a statically generated file which is not checked into the source code.
We use nexusjs which is a code-first graphql schema system. We produce the graphql schema file as a codegen step.
Opened this PR to address our use case which has been described in #2120. I would be happy to drive/refactor this change for general usage but not sure about the ergonomics for specifying "read schema from fs".
Type of change
expected)
How Has This Been Tested?
Used a workflow that runs a forked version of the graphql-inspector action. Note that we generate
services/graphql/generated/schema.graphql
in a previous workflow step.Checklist:
CONTRIBUTING doc and the
style guidelines of this project
Further comments
I did the least amount of work to solve my use case but I'd like to open discussion if this makes sense to support in a general sense.