In cases where you have multiple environments and not only production, GraphQL Inspector App can help you keep track of them.
Everything works out of the box, you just need to define the environments and associated branches.
Using multiple environments means:
- targeted notifications
- custom configuration
- and a lot more in near future
⚠️ Available only in GitHub Application ⚠️
A single environment setup looks like this:
schema: 'schema.graphql'branch: 'master'
Adding a new environment is fairly simple:
schema: 'schema.graphql' env: production: branch: 'master' preview: branch: 'develop'
From now on, every Pull Request or Push to
develop is tagged as
preview environment, everything related to
master is named
Defining the same notifications setup in each environment seems like a lot of work! Fortunately, GraphQL Inspector is capable of having a global configuration.
schema: 'schema.graphql' notifications: slack: '<slack-webhook>' env: production: branch: 'master' preview: branch: 'develop'
All defined environments have now Schema Change Notifications enabled, with Slack as the only target.
In some cases you may want to have a more advanced setup. GraphQL Inspector passes global settings to environment settings and merges them together. On conflicts, the environment setting wins.
schema: 'schema.graphql' diff: annotations: truenotifications: webhook: '<webhook-url>' slack: '<global-slack-url>' env: production: branch: 'master' notifications: slack: '<production-slack-url>' preview: branch: 'develop' diff: annotations: false
In the example above, every enironment has a webhook and slack notifications enabled but in case of Production environemnt, Slack has a differrent url. The Preview environment uses the global Slack but has annotation disabled.