graphql-inspector
graphql-inspector copied to clipboard
Github Action fails with "Invalid or incomplete introspection result."
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)
no updates or possible solutions to check?
Seeing the same issue with a similar schema file format here, comparing local JSON schema against an endpoint.
- 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?
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] } }.