You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The join__field directive is absent from the supergraph if only one subgraph is passed in to composeServices.
This caused an issue for me when onboarding teams to a new registry because initially, when only one schema was onboard, all query fields disappeared when generating a stitched schema via getStitchedSchemaFromSupergraphSdl from @graphql-tools/federation.
The expectation is that join__field will always be added to fields
Issue Description
The
join__field
directive is absent from the supergraph if only one subgraph is passed in tocomposeServices
.This caused an issue for me when onboarding teams to a new registry because initially, when only one schema was onboard, all query fields disappeared when generating a stitched schema via
getStitchedSchemaFromSupergraphSdl
from@graphql-tools/federation
.The expectation is that join__field will always be added to fields
Link to Reproduction
https://codesandbox.io/p/sandbox/apollo-composition-issue-ky6g83?file=%2Findex.js%3A18%2C5&layout=%257B%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522rootPanelGroup%2522%253A%257B%2522direction%2522%253A%2522horizontal%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522id%2522%253A%2522ROOT_LAYOUT%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522cloiyyl8w00073b6h667ggidf%2522%252C%2522sizes%2522%253A%255B70%252C30%255D%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522EDITOR%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522id%2522%253A%2522cloiyyl8w00033b6hxow69nu8%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522SHELLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522id%2522%253A%2522cloiyyl8w00053b6h1u7891v2%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522DEVTOOLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522id%2522%253A%2522cloiyyl8w00063b6hqszg1as8%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%252C%2522sizes%2522%253A%255B100%252C0%255D%257D%252C%2522tabbedPanels%2522%253A%257B%2522cloiyyl8w00033b6hxow69nu8%2522%253A%257B%2522id%2522%253A%2522cloiyyl8w00033b6hxow69nu8%2522%252C%2522tabs%2522%253A%255B%257B%2522type%2522%253A%2522FILE%2522%252C%2522filepath%2522%253A%2522%252Findex.js%2522%252C%2522id%2522%253A%2522cloiz136b00oq3b6hcugh78uj%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%252C%257B%2522type%2522%253A%2522FILE%2522%252C%2522filepath%2522%253A%2522%252F.codesandbox%252Ftasks.json%2522%252C%2522id%2522%253A%2522cloize2xp03t23b6hbeyg4sve%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%255D%252C%2522activeTabId%2522%253A%2522cloiz136b00oq3b6hcugh78uj%2522%257D%252C%2522cloiyyl8w00063b6hqszg1as8%2522%253A%257B%2522id%2522%253A%2522cloiyyl8w00063b6hqszg1as8%2522%252C%2522activeTabId%2522%253A%2522cloiz8tbp01ys3b6hyailhgjh%2522%252C%2522tabs%2522%253A%255B%257B%2522type%2522%253A%2522SANDBOX_INFO%2522%252C%2522id%2522%253A%2522cloiz8tbp01ys3b6hyailhgjh%2522%252C%2522mode%2522%253A%2522permanent%2522%257D%255D%257D%252C%2522cloiyyl8w00053b6h1u7891v2%2522%253A%257B%2522id%2522%253A%2522cloiyyl8w00053b6h1u7891v2%2522%252C%2522activeTabId%2522%253A%2522cloizi2b304vo3b6h6qvs9lqw%2522%252C%2522tabs%2522%253A%255B%257B%2522type%2522%253A%2522TASK_LOG%2522%252C%2522taskId%2522%253A%2522start%2522%252C%2522id%2522%253A%2522cloizi2b304vo3b6h6qvs9lqw%2522%252C%2522mode%2522%253A%2522permanent%2522%257D%255D%257D%257D%252C%2522showDevtools%2522%253Afalse%252C%2522showShells%2522%253Atrue%252C%2522showSidebar%2522%253Atrue%252C%2522sidebarPanelSize%2522%253A15%257D
Reproduction Steps
Call
composeServices
with a single subgraphThe text was updated successfully, but these errors were encountered: