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

Github Action fails with "Invalid or incomplete introspection result."

Open CelsoSantos opened this issue 2 years ago • 4 comments

Describe the bug

Whenever trying to use the Github Action, the jobs will fail with the following message, even though the introspection file DOES follow the rule:

Error: Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: { data: { __schema: [Object] } }.

To Reproduce Steps to reproduce the behavior: Run/Apply the configuration demonstrated on the Environment section and the error should be present

Expected behavior

Expected the process to either do nothing but exit in a success state or get a changelog if changes are present.

Environment:

  graphql-changelogs:
    name: Generate GraphQL API Changelogs
    needs: changes
    runs-on: ubuntu-latest
    timeout-minutes: 5
    if: needs.changes.outputs.graphql-api-docs == 'true'

    steps:
      - name: Checkout code
        uses: actions/checkout@v3
        with:
          fetch-depth: 1

      # - uses: kamilkisiela/graphql-inspector@master
      #   with:
      #     name: 'Validate AC API'
      #     schema: 'master:actionable-content/ac-api/src/main/resources/graphql/schema.json'

      - name: 'Validate Notifications API'
        uses: kamilkisiela/[email protected]
        with:
          name: 'Validate Notification API'
          schema: 'master:notification/notification-api/src/main/resources/graphql/schema.json'

EDIT: Adding a screenshot of the schema file (cannot share the file though, sorry) Screen Shot 2022-06-30 at 11 43 41

CelsoSantos avatar Jun 29 '22 17:06 CelsoSantos

no updates or possible solutions to check?

CelsoSantos avatar Aug 04 '22 15:08 CelsoSantos

Seeing the same issue with a similar schema file format here, comparing local JSON schema against an endpoint.

sebj avatar Aug 23 '22 15:08 sebj

  • The cli works fine, either on GHA or locally.
  • The Action fails with this message
  • The Docker container on v3.3.0 is failling with some typescript error (it's possible I'm using it wrong)
  • The GH Application seems limited to one schema..

Can we please sort this out? How can I help?

CelsoSantos avatar Aug 24 '22 18:08 CelsoSantos

I am also experiencing this issue. Any update would be greatly appreciated

      - uses: kamilkisiela/graphql-inspector@master
        with:
          name: Validate GraphQL API
          schema: 'master:path/schema.json'
{
  "data": {
    "__schema": {
      "queryType": {
        "name": "Query"
      },
      "mutationType": {
        "name": "Mutation"
      },
      "subscriptionType": null,
      "types": [......],
      "directives": [.......]
  }
}

Query master:path/schema.json Query refs/pull/8630/merge:path/schema.json from Got both sources Error: Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: { data: { __schema: [Object] } }.

pstarritt-evooq avatar Sep 22 '22 13:09 pstarritt-evooq