This repository contains a set of tests to evaluate and compare the compatibility of different GraphQL gateways with Apollo Federation.
🌐 See the results of our audit
📖 Read more about our methodology and why we created this audit
Gateway | Compatibility | Test Cases | Test Suites |
---|---|---|---|
Hive Gateway | 99.42% | 🟢 170 ❌ 1 | 🟢 40 ❌ 1 |
Apollo Router | 97.66% | 🟢 167 ❌ 4 | 🟢 39 ❌ 2 |
Apollo Gateway | 97.08% | 🟢 166 ❌ 5 | 🟢 38 ❌ 3 |
Grafbase Gateway | 74.85% | 🟢 128 ❌ 43 | 🟢 29 ❌ 12 |
Cosmo Router | 71.93% | 🟢 123 ❌ 48 | 🟢 21 ❌ 20 |
Inigo Gateway | 46.78% | 🟢 80 ❌ 91 | 🟢 12 ❌ 29 |
The tests are based on the Apollo Federation specification and cover the following directives:
@interfaceObject
@key
@external
@provides
@requires
@extends
@inaccessible
@shareable
@skip
@include
@composeDirective
@override
Out of scope (limited by Enterprise license of Apollo Router):
We are not able to test the following directives on Apollo Router due to the limitations of the Enterprise license:
@authenticated
@policy
@requiresScopes
@override(label:)
We plan to test these directives as soon as we have access to the Enterprise license.
TODO: we're working on a CLI to make it easier to run the tests, stay tuned!
First of all, you need to install and prepare the gateways. You can do this by running the following command:
make install
Important
Be aware that Node
and npm
are required to run the whole setup.
You can run the tests for each gateway by running the following command:
make test-all
You can run the tests for a specific gateway by running the following command:
make test-[name of the gateway]
make test-grafbase-gateway
make test-cosmo-router
make test-hive-gateway
make test-apollo-router
In case you want to run only a limited set of tests, you can do so by running the following command:
make test-suite-[name of the gateway] TEST_SUITE=[id of the test suite]
There's also the possibility to start a gateway for a selected supergraph, in case you want to run the queries yourself.
make run-[name of the gateway] TEST_SUITE=[id of the test suite]