Github action: Allow globs in schema
See original GitHub issueIs your feature request related to a problem? Please describe.
Often graphql schema’s are split in multiple files.
Describe the solution you’d like
Allow to specify the schema using a glob as in schema: main:api/**/*.graphql
.
Describe alternatives you’ve considered
Currently, globs are not supported as the above schema leads to the following error:
Error: ENOENT: no such file or directory, open '/home/runner/work/JabRefOnline/JabRefOnline/api/**/*.graphql'
Query main:api/**/*.graphql from JabRef/JabRefOnline
{ repository: { object: null } }
Error: result.repository.object.text is null
at /home/runner/work/_actions/kamilkisiela/graphql-inspector/v2.6.2/action/index.js:1:357422
at Generator.next (<anonymous>)
at fulfilled (/home/runner/work/_actions/kamilkisiela/graphql-inspector/v2.6.2/action/index.js:1:254624)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
It would be also nice if the schema could automatically be picked up from a graphql.config file.
Additional context
Moreover, the schema
field is not documented.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:11 (3 by maintainers)
Top Results From Across the Web
Workflow syntax for GitHub Actions
The branches and branches-ignore keywords accept glob patterns that use characters like * , ** , + , ? , ! and others...
Read more >GitHub Actions CI Conditional Regex - Stack Overflow
I'm trying to move my CI workflow from CircleCI to GitHub Actions. The last major struggle I'm facing is with deployment.
Read more >Building Your First GitHub Action - Azure DevOps Blog
The action we build in this guide will make it easy to upload files to Azure Blob Storage, a service for massively scalable...
Read more >Intellisense for your GitHub Actions workflows - Patrik Svensson
Today I found out that there is a JSON schema for GitHub Actions over at json.schemastore.org, and that means that we can use...
Read more >yaml-language-server - npm
schemaStore.enable : When set to true the YAML language server will ... We use a GitHub Action to publish each change in the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If your are using
endpoint
as a base (assuming you don’t want to git track a combined schema file) then you can merge your schema files into one using a simple script:bin/combine-graphql-files.js
Then in call it right before in your workflow and reference the file in graphql-inspector step:
Or if you prefer inline instead of referencing a file
If it helps, here’s a sample config from one of our repos that merges multiple schema files together across different branches using two different checkout steps:
It’s currently using https://github.com/xuorig/graphql-schema_comparator but could easily be modified to use
graphql-inspector
instead (using the snippet above I think). In our repo structure, schema files live in anapi
folder under the root.