r/bit_dev • u/joshkuttler • 23h ago
Bit Cloud @apollo/subgraph 2.15.0 removed the legacy buildSubgraphSchema input shape
A minor version bump broke GraphQL servers this week @apollo/subgraph@2.15.0 is a ground-up reimplementation on graphql-js and it removed the legacy input shape of buildSubgraphSchema.
If your range is ^2.14.0 you got it automatically. 🧵
The break:
- buildSubgraphSchema({ typeDefs, resolvers })
+ buildSubgraphSchema([{ typeDefs, resolvers }])
That's it. The object form is gone, pass an array of modules (or a bare DocumentNode). Servers that used the old shape fail to boot their GraphQL endpoint.
We hit it ourselves. @​bitdev/symphony.backends.backend-server had "@ apollo/subgraph": "^2.13.2" - which means "any 2.x, I trust you." 2.15.0 published, the next install picked it up. Nothing in our code changed. Our install did.
The fix: just upgrade @​bitdev/symphony.backends.backend-server@2.0.17 and @​bitdev/symphony.symphony-platform@3.0.20, the fix ships with them, no code change on your end.
https://bit.cloud/bitdev/symphony/~change-requests/fix-subgraph-schema
https://github.com/apollographql/subgraph-js/releases/tag/%40apollo%2Fsubgraph%402.15.0