Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export server/router #84

Merged
merged 8 commits into from
Nov 18, 2024
Merged

Export server/router #84

merged 8 commits into from
Nov 18, 2024

Conversation

ardatan
Copy link
Member

@ardatan ardatan commented Nov 15, 2024

  • Export createRouter by exporting the HTTP handler so we can use fetch function from it inside tests without starting a real server
  • Export close method in the return value of serve so we can use start and stop server
  • Avoid top-level await for better support in most envs
  • In case of npm install from another project, it runs tsc to generate js and declaration files to be used in our Hive GW test suite here;
    Add Federation Compatibility Test Suite graphql-hive/gateway#120

Copy link

github-actions bot commented Nov 15, 2024

Compatibility Results

Summary

Gateway Compatibility Test Cases Test Suites
Hive Gateway 100.00% 🟢 171 🟢 41
Apollo Router 97.66% 🟢 167 ❌ 4 🟢 39 ❌ 2
Apollo Gateway 97.08% 🟢 166 ❌ 5 🟢 38 ❌ 3
Cosmo Router 71.93% 🟢 123 ❌ 48 🟢 21 ❌ 20
Grafbase Gateway 66.08% 🟢 113 ❌ 58 🟢 22 ❌ 19
Inigo Gateway 0.00% ❌ 171 ❌ 41

Detailed Results

Take a closer look at the results for each gateway.

You can look at the full list of tests here. Every test id corresponds to a directory in the src/test-suites folder.

Hive Gateway

Results abstract-types
🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢
child-type-mismatch
🟢🟢🟢🟢
circular-reference-interface
🟢🟢
complex-entity-call
🟢
corrupted-supergraph-node-id
🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢
enum-intersection
🟢🟢🟢🟢🟢
fed1-external-extends
🟢🟢
fed1-external-extends-resolvable
🟢
fed1-external-extension
🟢🟢
fed2-external-extends
🟢🟢
fed2-external-extension
🟢🟢
include-skip
🟢🟢🟢🟢
input-object-intersection
🟢🟢🟢
interface-object-with-requires
🟢🟢🟢🟢🟢🟢🟢
keys-mashup
🟢
mutations
🟢🟢🟢
mysterious-external
🟢🟢
nested-provides
🟢🟢
node
🟢
non-resolvable-interface-object
🟢🟢🟢🟢🟢🟢🟢
null-keys
🟢
override-type-interface
🟢🟢🟢🟢
override-with-requires
🟢🟢🟢🟢
parent-entity-call
🟢
parent-entity-call-complex
🟢
provides-on-interface
🟢🟢
provides-on-union
🟢🟢
requires-interface
🟢🟢🟢🟢🟢
requires-requires
🟢🟢🟢🟢🟢
requires-with-argument
🟢🟢🟢🟢🟢
requires-with-fragments
🟢🟢🟢🟢🟢🟢
shared-root
🟢🟢
simple-entity-call
🟢
simple-inaccessible
🟢🟢🟢🟢
simple-interface-object
🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢
simple-override
🟢🟢
simple-requires-provides
🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢
typename
🟢🟢🟢🟢🟢🟢
unavailable-override
🟢🟢
union-interface-distributed
🟢🟢🟢🟢🟢🟢🟢
union-intersection
🟢🟢🟢🟢🟢🟢🟢🟢

Apollo Router

Results abstract-types
🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢
child-type-mismatch
🟢🟢🟢🟢
circular-reference-interface
🟢🟢
complex-entity-call
🟢
corrupted-supergraph-node-id
🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢
enum-intersection
🟢🟢🟢🟢🟢
fed1-external-extends
🟢🟢
fed1-external-extends-resolvable
🟢
fed1-external-extension
🟢🟢
fed2-external-extends
🟢🟢
fed2-external-extension
🟢🟢
include-skip
🟢🟢🟢🟢
input-object-intersection
🟢🟢🟢
interface-object-with-requires
🟢🟢🟢🟢🟢🟢🟢
keys-mashup
mutations
🟢🟢🟢
mysterious-external
🟢🟢
nested-provides
🟢🟢
node
🟢
non-resolvable-interface-object
🟢🟢🟢🟢🟢🟢🟢
null-keys
🟢
override-type-interface
🟢🟢🟢🟢
override-with-requires
🟢🟢🟢🟢
parent-entity-call
🟢
parent-entity-call-complex
🟢
provides-on-interface
🟢🟢
provides-on-union
🟢🟢
requires-interface
🟢🟢🟢🟢🟢
requires-requires
🟢🟢🟢🟢🟢
requires-with-argument
🟢🟢❌❌❌
requires-with-fragments
🟢🟢🟢🟢🟢🟢
shared-root
🟢🟢
simple-entity-call
🟢
simple-inaccessible
🟢🟢🟢🟢
simple-interface-object
🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢
simple-override
🟢🟢
simple-requires-provides
🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢
typename
🟢🟢🟢🟢🟢🟢
unavailable-override
🟢🟢
union-interface-distributed
🟢🟢🟢🟢🟢🟢🟢
union-intersection
🟢🟢🟢🟢🟢🟢🟢🟢

Apollo Gateway

Results abstract-types
🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢
child-type-mismatch
🟢🟢🟢🟢
circular-reference-interface
🟢🟢
complex-entity-call
🟢
corrupted-supergraph-node-id
🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢
enum-intersection
🟢🟢🟢🟢🟢
fed1-external-extends
🟢🟢
fed1-external-extends-resolvable
🟢
fed1-external-extension
🟢🟢
fed2-external-extends
🟢🟢
fed2-external-extension
🟢🟢
include-skip
🟢🟢🟢🟢
input-object-intersection
🟢🟢🟢
interface-object-with-requires
🟢🟢🟢🟢🟢🟢🟢
keys-mashup
mutations
🟢🟢🟢
mysterious-external
🟢🟢
nested-provides
🟢🟢
node
🟢
non-resolvable-interface-object
🟢❌🟢🟢🟢🟢🟢
null-keys
🟢
override-type-interface
🟢🟢🟢🟢
override-with-requires
🟢🟢🟢🟢
parent-entity-call
🟢
parent-entity-call-complex
🟢
provides-on-interface
🟢🟢
provides-on-union
🟢🟢
requires-interface
🟢🟢🟢🟢🟢
requires-requires
🟢🟢🟢🟢🟢
requires-with-argument
🟢🟢❌❌❌
requires-with-fragments
🟢🟢🟢🟢🟢🟢
shared-root
🟢🟢
simple-entity-call
🟢
simple-inaccessible
🟢🟢🟢🟢
simple-interface-object
🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢
simple-override
🟢🟢
simple-requires-provides
🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢
typename
🟢🟢🟢🟢🟢🟢
unavailable-override
🟢🟢
union-interface-distributed
🟢🟢🟢🟢🟢🟢🟢
union-intersection
🟢🟢🟢🟢🟢🟢🟢🟢

Cosmo Router

Results abstract-types
🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢
child-type-mismatch
❌❌❌🟢
circular-reference-interface
🟢🟢
complex-entity-call
corrupted-supergraph-node-id
❌🟢🟢🟢🟢❌🟢🟢🟢🟢
enum-intersection
🟢🟢🟢🟢🟢
fed1-external-extends
🟢🟢
fed1-external-extends-resolvable
fed1-external-extension
🟢🟢
fed2-external-extends
🟢🟢
fed2-external-extension
🟢🟢
include-skip
🟢🟢🟢🟢
input-object-intersection
🟢🟢🟢
interface-object-with-requires
❌❌🟢🟢❌❌❌
keys-mashup
🟢
mutations
🟢🟢❌
mysterious-external
🟢🟢
nested-provides
🟢🟢
node
🟢
non-resolvable-interface-object
🟢🟢🟢🟢❌🟢❌
null-keys
override-type-interface
🟢❌🟢🟢
override-with-requires
🟢🟢🟢🟢
parent-entity-call
🟢
parent-entity-call-complex
provides-on-interface
❌❌
provides-on-union
❌❌
requires-interface
🟢🟢❌🟢🟢
requires-requires
🟢🟢🟢🟢🟢
requires-with-argument
❌❌❌❌❌
requires-with-fragments
❌❌❌❌❌❌
shared-root
🟢❌
simple-entity-call
🟢
simple-inaccessible
🟢🟢🟢🟢
simple-interface-object
🟢❌🟢🟢🟢❌❌❌❌🟢❌❌❌
simple-override
🟢🟢
simple-requires-provides
🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢
typename
🟢🟢🟢🟢❌🟢
unavailable-override
🟢🟢
union-interface-distributed
❌🟢🟢🟢🟢🟢🟢
union-intersection
🟢🟢🟢❌❌🟢🟢❌

Grafbase Gateway

Results abstract-types
🟢🟢❌🟢🟢❌❌❌❌❌❌❌❌❌❌❌❌
child-type-mismatch
❌❌❌🟢
circular-reference-interface
🟢🟢
complex-entity-call
corrupted-supergraph-node-id
❌🟢❌🟢🟢❌🟢🟢🟢🟢
enum-intersection
🟢🟢🟢🟢🟢
fed1-external-extends
🟢🟢
fed1-external-extends-resolvable
fed1-external-extension
🟢🟢
fed2-external-extends
🟢🟢
fed2-external-extension
🟢🟢
include-skip
🟢🟢🟢🟢
input-object-intersection
🟢🟢🟢
interface-object-with-requires
🟢🟢❌🟢❌❌❌
keys-mashup
🟢
mutations
🟢🟢❌
mysterious-external
🟢🟢
nested-provides
🟢🟢
node
🟢
non-resolvable-interface-object
❌🟢❌🟢🟢🟢❌
null-keys
override-type-interface
❌❌🟢🟢
override-with-requires
🟢🟢🟢🟢
parent-entity-call
parent-entity-call-complex
🟢
provides-on-interface
❌❌
provides-on-union
🟢❌
requires-interface
🟢🟢🟢🟢🟢
requires-requires
❌❌❌🟢❌
requires-with-argument
🟢❌❌❌❌
requires-with-fragments
❌🟢🟢🟢❌🟢
shared-root
🟢🟢
simple-entity-call
🟢
simple-inaccessible
🟢🟢🟢🟢
simple-interface-object
🟢🟢❌🟢❌❌❌🟢❌❌❌❌❌
simple-override
🟢🟢
simple-requires-provides
🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢
typename
🟢🟢🟢🟢🟢🟢
unavailable-override
🟢🟢
union-interface-distributed
🟢❌🟢🟢🟢🟢🟢
union-intersection
🟢🟢🟢❌🟢🟢🟢❌

Inigo Gateway

Results abstract-types
❌❌❌❌❌❌❌❌❌❌❌❌❌❌❌❌❌
child-type-mismatch
❌❌❌❌
circular-reference-interface
❌❌
complex-entity-call
corrupted-supergraph-node-id
❌❌❌❌❌❌❌❌❌❌
enum-intersection
❌❌❌❌❌
fed1-external-extends
❌❌
fed1-external-extends-resolvable
fed1-external-extension
❌❌
fed2-external-extends
❌❌
fed2-external-extension
❌❌
include-skip
❌❌❌❌
input-object-intersection
❌❌❌
interface-object-with-requires
❌❌❌❌❌❌❌
keys-mashup
mutations
❌❌❌
mysterious-external
❌❌
nested-provides
❌❌
node
non-resolvable-interface-object
❌❌❌❌❌❌❌
null-keys
override-type-interface
❌❌❌❌
override-with-requires
❌❌❌❌
parent-entity-call
parent-entity-call-complex
provides-on-interface
❌❌
provides-on-union
❌❌
requires-interface
❌❌❌❌❌
requires-requires
❌❌❌❌❌
requires-with-argument
❌❌❌❌❌
requires-with-fragments
❌❌❌❌❌❌
shared-root
❌❌
simple-entity-call
simple-inaccessible
❌❌❌❌
simple-interface-object
❌❌❌❌❌❌❌❌❌❌❌❌❌
simple-override
❌❌
simple-requires-provides
❌❌❌❌❌❌❌❌❌❌❌❌
typename
❌❌❌❌❌❌
unavailable-override
❌❌
union-interface-distributed
❌❌❌❌❌❌❌
union-intersection
❌❌❌❌❌❌❌❌

@kamilkisiela kamilkisiela enabled auto-merge (squash) November 18, 2024 09:01
@kamilkisiela kamilkisiela merged commit d214e4a into main Nov 18, 2024
3 checks passed
@kamilkisiela kamilkisiela deleted the expose-server-logic branch November 18, 2024 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants