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

New scenario: null keys #75

Merged
merged 6 commits into from
Oct 22, 2024
Merged

New scenario: null keys #75

merged 6 commits into from
Oct 22, 2024

Conversation

ardatan
Copy link
Member

@ardatan ardatan commented Oct 22, 2024

No description provided.

Copy link

github-actions bot commented Oct 22, 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 69.59% 🟢 119 ❌ 52 🟢 19 ❌ 22
Grafbase Gateway 59.06% 🟢 101 ❌ 70 🟢 19 ❌ 22

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
❌🟢❌❌🟢🟢🟢❌

type BookContainer {
book: Book
}
type Book @key(fields: "upc") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you implement a resolver for it? I know it's useless, but if a gateway calls it for some reason, a missing resolver will cause an error and affect the result.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done 👍

book = books.find((book) => book.upc === reference.upc);
}
if (book != null) {
// Return this null on purpose
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on what purpose? What's the purpose?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we explain here why it returns null for a Book with upc === 'b3'?

The query starts from Query.bookContainers. The id needs to be resolved from upc, in order to resolve Book.author. Because Book with upc === 'b3' is not resolved, the author is null.

Copy link
Member Author

@ardatan ardatan Oct 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scenario is;
a has Book entities with upcs b1, b2 and b3
But b has Book entities with only b1 and b2.
And Hive GW was sending { __typename: "Book", id: null } to c subgraph while it should not send it already as id is non-null.

@kamilkisiela kamilkisiela merged commit fc65104 into main Oct 22, 2024
3 checks passed
@kamilkisiela kamilkisiela deleted the null-keys branch October 22, 2024 13:48
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