Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
share-2

GitHub Action

Apollo Federation Subgraph Compatibility

v1.1.0

Apollo Federation Subgraph Compatibility

share-2

Apollo Federation Subgraph Compatibility

Github Action for checking a subgraph's compatibility with a federated gateway

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Apollo Federation Subgraph Compatibility

uses: apollographql/[email protected]

Learn more about this action in apollographql/federation-subgraph-compatibility

Choose a version

Apollo Federation Subgraph Compatibility Action

Marketplace Continuous Integration Join the community forum MIT License

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).

Usage

- uses: apollographql/federation-subgraph-compatibility@v1
  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

Known Limitations

Default GITHUB_TOKEN doesn't work with forks

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.

Release

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.

Contact

If you have a specific question about the testing library or code, please start a discussion in the Apollo community forums.

Security

For more info on how to contact the team for security issues, see our Security Policy.

License

This library is licensed under The MIT License (MIT).