-
Notifications
You must be signed in to change notification settings - Fork 206
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Component(s)
router
Component version
0.262.1
wgc version
0.96.1
controlplane version
0.169.3
router version
0.262.1
What happened?
Description
I encountered an issue where fields inside a nested inline fragment are missing from the response, but only when the inline fragment is placed after another inline fragment within a named fragment on an Interface.
Changing the order of the inline fragments resolves the issue, but it would be challenging to change the queries to support existing API clients.
Scenario:
- I have an Interface
Baseimplemented byProductAandProductB. - I am querying a
ProductA. - I use a named fragment
fragment ProductDetail on Base. - Inside this fragment, I have inline fragments for both
... on ProductBand... on ProductA.
Steps to Reproduce
- Define schema with Interface
Base, implementing typesProductAandProductB.ProductAhas a nested object fieldcategory.Categoryhas two fieldsidandowner.Ownerhas fieldname. - Execute a query that selects fields from
ProductAvia the interface fragment.
query Reproduce {
productA {
category {
id
}
... on Base {
...ProductDetail
}
}
}
fragment ProductDetail on Base {
# 1. ProductB is defined FIRST
... on ProductB {
category {
# Fields here (e.g. "owner") are MISSING in the response
owner { name }
}
}
# 2. ProductA is defined SECOND
... on ProductA {
category {
# Fields here (e.g. "owner") are MISSING in the response
owner { name }
}
}
}Expected Result
Actual Result
{
"data": {
"productA": {
"category": {
"id": "category-id"
}
}
}
}Environment information
Environment
OS: Linux(on Docker Compose)
Compiler(if manually compiled): go1.25.4
Router configuration
Router execution config
Log output
Additional context
No response
mangano-ito and polamjag
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
{ "data": { "productA": { "category": { "id": "category-id", "owner": { "name": "category-owner-name" } } } } }