Intercepting Schema Changes
GraphQL Inspector lets you intercept schema changes via HTTP. You're able to decide which changes are acceptable which are not and all of this through even a serverless function.
Whenever GraphQL Inspector runs schema checking triggered by Push or Pull Request events, your http endpoint receives a list of changes, list of related Pull Request or a commit SHA.
#
UsageConfiguring an interceptor looks fairly similar to endpoints
, except you can't modify a method, it's always POST request.
Single environment setup:
Multiple environment setup:
#
Setting an interceptor logicLet's set all criticality levels to Non-Breaking and GitHub Check conculsion to Success.
There's so much freedom here. Because you know which commit or a pull request triggered the check, you're able to decide if submitted changes should be rejected or accepted by fetching informations from GitHub API or your internal APIs.
#
Payload and Response structrues#
PayloadDescribed in TypeScript. Look at the source code to see the exact shape.
#
ResponseDescribed in TypeScript. Look at the source code to see the exact shape.