question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GitHub Actions: schema.graphql in subdirectory

See original GitHub issue

Hey @kamilkisiela,

not 100% sure if config bug or not supported:

Describe the bug

  • Configure the GitHub Action to a path

  validate-graphql:
    name: Validate GraphQL
    runs-on: ubuntu-18.04
    timeout-minutes: 5
    steps:
      - name: Checkout Code
        uses: actions/checkout@v1
      - name: graphql-inspector
        uses: kamilkisiela/graphql-inspector@master
        if: always()
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          schema: 'master:schema/local/schema.graphql'
          annotations: true

Expected behavior

  • Validation of Schema in Subpath Works

Additional context

Query master:schema/local/schema.graphql from org/repo
{ repository: { object: null } }
Error: result.repository.object.text is null
    at /home/runner/work/_actions/kamilkisiela/graphql-inspector/master/action/index.js:1:774237
    at Generator.next (<anonymous>)
    at fulfilled (/home/runner/work/_actions/kamilkisiela/graphql-inspector/master/action/index.js:1:436145)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
##[error]Failed to load 'schema/local/schema.graphql' (ref: master)

```

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:16 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
mfrancalealcommented, Jan 27, 2021

I have the same problem. I tried schema: master:schema/local/schema.graphql but don’t work.

This is my code:

name: Laravel Workflows on: push jobs: build: name: Laravel/GraphQl Build runs-on: ubuntu-20.04

steps:
  - uses: actions/checkout@master
  - uses: ./.github/actions/composer
  - uses: ./.github/actions/config-laravel
  - run: ./vendor/bin/phpunit
  - run: ./vendor/bin/phpcs
  - run: |
      cd /home/runner/work/gitactions/gitactions
      ls
  - name: GraphQl Inspector
    uses: kamilkisiela/graphql-inspector@master
    with:
      github-token: ${{ secrets.GITHUB_TOKEN }}
      schema: 'graphql:schema.graphql'
      annotations: true

`

This is the error: Error: ENOENT: no such file or directory, open '/home/runner/work/gitactions/gitactions/schema/local/schema.graphql'

My file schema.graphql is at /home/runner/work/gitactions/gitactions/graphql. How set this path in file yaml?

Can someone help me?

I solved. The name of my branch is main not master.

1reaction
mfrancalealcommented, Jan 27, 2021

I have the same problem. I tried schema: master:schema/local/schema.graphql but don’t work.

This is my code:

name: Laravel Workflows on: push jobs: build: name: Laravel/GraphQl Build runs-on: ubuntu-20.04

steps:
  - uses: actions/checkout@master
  - uses: ./.github/actions/composer
  - uses: ./.github/actions/config-laravel
  - run: ./vendor/bin/phpunit
  - run: ./vendor/bin/phpcs
  - run: |
      cd /home/runner/work/gitactions/gitactions
      ls
  - name: GraphQl Inspector
    uses: kamilkisiela/graphql-inspector@master
    with:
      github-token: ${{ secrets.GITHUB_TOKEN }}
      schema: 'graphql:schema.graphql'
      annotations: true

`

This is the error: Error: ENOENT: no such file or directory, open '/home/runner/work/gitactions/gitactions/schema/local/schema.graphql'

My file schema.graphql is at /home/runner/work/gitactions/gitactions/graphql. How set this path in file yaml?

Can someone help me?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enable autoloading of types in subdirectories under graphql ...
The issue is that conceptually different Types currently must be mixed in the same folder, e.g. Base Types inheriting GraphQL::Schema::{sometype ...
Read more >
Question: Sub folders inside of folders in graphql/ · Issue #1243
I want create sub folder in resolvers/ like: resolvers/create ... graphql-ruby/lib/graphql/schema/member/base_dsl_methods.rb.
Read more >
Support for .graphqlconfig in a subdirectory · Issue #24 - GitHub
graphqlconfig files from either subdirectories, or the setting/ability to load from a specified file/folder. My set up looks like the following:.
Read more >
Cannot put graphqls files in a subfolder · Issue #10 - GitHub
Hello, I've just tried to split my schema.hraphqls file into two files, and I put these two files in a subfolder of my...
Read more >
double star (**) in glob does not recursively include ... - GitHub
I have a directory structure like: graphql mutations ... double star (**) in glob does not recursively include subdirectories #395.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found