GitHub Action
Apollo Federation Subgraph Compatibility
federation-subgraph-compatibility
is a Github Action that allows you to run Apollo Federation Subgraph Specification compatibility tests against your test subgraph implementation. See compatibility testing docs for details on the expected schema and the data sets as well as information about the executed tests.
If action is used on PR workflows, compatibility results can be posted on the PR (requires passing in Github Token to the configuration).
- uses: apollographql/federation-subgraph-compatibility@v2
with:
# [Required] Docker Compose file to start up the subgraph
compose: 'path/to/docker-compose.yaml'
# [Required] Path to the GraphQL schema file
schema: 'path/to/schema.graphql'
# GraphQL endpoint path, defaults to '' (empty)
path: ''
# GraphQL endpoint HTTP port, defaults to 4001
port: 4001
# Turn on debug mode with extra log info
debug: false
# Github Token / PAT for submitting PR comments
token: ''
# Boolean flag to indicate whether any failing test should fail the script
failOnWarning: false
# Boolean flag to indicate whether any failing required functionality test should fail the script
failOnRequired: false
# Working directory to run the action from. Should be relative from the root of the project.
workingDirectory: ''
Due to the security reasons, maximum GITHUB_TOKEN
permission is set to read for PRs from public forked repositories (source). If you want to run this action against PRs from forked repositories you will need to use Personal Access Token that was generated with appropriate permissions. See Github documentation for more details.
This project is released through Github Actions. To release a new version simply run release workflow with a target release version. Release workflow will automatically cut a new branch and tag the release.
If you have a specific question about the testing library or code, please start a discussion in the Apollo community forums.
For more info on how to contact the team for security issues, see our Security Policy.
This library is licensed under The MIT License (MIT).