Skip to content

added new test: requires-with-argument-conflict #138

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dotansimha
Copy link
Member

@dotansimha dotansimha commented Jun 8, 2025

This scenario demonstrates a case where 2 fields in the schema have different arguments passed to requires.

# Subgraph A 
type Test @key(fields: "id") {
   # the actual field being required by others. The argument makes it tricky to query and batch.
   r(a: Int!): String @external
 
   # Each one of the following requires field `r`, but with different arguments
   f1: String @requires(fields: "r(a: 1)") 
   f2: String @requires(fields: "r(a: 2)")
}

# Subgraph B
type Test @key(fields: "id") {
   id: ID!
   r(a: Int!): String
}

type Query  {
   test: Test 
}

When queried together like this:

query {
   test {
     f1
     f2
   }
}

Then the queries to the upstream subgraph will conflicts both on input and on output fields:

  • Output: failure due to the fact that we can't query { r(a: 1) r(a: 2 } at the same time, meaning that one of the fields needs to be aliased.
  • Input: failure to the fact that we can't pass representations with the same field twice. If we batch the call to subgraph A with both f1 and f2 fields, it means that we need to pass r value twice (leading to something like { variables: { var1: { r: "...", r: "..." }}.

Copy link

github-actions bot commented Jun 8, 2025

Compatibility Results

Summary

Gateway Compatibility Test Cases Test Suites
Hive Gateway 99.47% 🟢 188 ❌ 1 🟢 41 ❌ 1
Apollo Router 97.35% 🟢 184 ❌ 5 🟢 39 ❌ 3
Apollo Gateway 96.83% 🟢 183 ❌ 6 🟢 38 ❌ 4
Cosmo Router 94.71% 🟢 179 ❌ 10 🟢 36 ❌ 6
Grafbase Gateway 89.95% 🟢 170 ❌ 19 🟢 34 ❌ 8
Inigo Gateway 48.68% 🟢 92 ❌ 97 🟢 12 ❌ 30

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

Copy link
Member

@ardatan ardatan left a comment

Choose a reason for hiding this comment

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

Makes sense to me! This is a bug needs to be fixed in Hive GW

requires-with-argument-conflict
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