Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"mode": "pre",
"tag": "alpha"
}
14 changes: 14 additions & 0 deletions .changeset/tame-planes-jog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
"@apollo/subgraph": minor
---

Reimplement `@apollo/subgraph` directly using `graphql-js` instead of `@apollo/federation-internals`, making it usable with any `graphql-js` compatible subgraph. Unless otherwise noted, behavior is intended to stay compatible with the previous implementation.

- **Use `graphql-js` functionality over custom logic.** All logic is now re-implemented using `graphql-js` functionality. `@apollo/federation-internals` is no longer a dependency.
- **`printSubgraphSchema` now prints the complete schema**, federation directives, types, and root fields included. NOTE: It is just a thin wrapper around `@graphql-tools/utils`'s `printSchemaWithDirectives`.
- **BREAKING: `LegacySchemaModule` input shape removed.** `buildSubgraphSchema` no longer accepts Apollo Server's old `{ typeDefs, resolvers }` object shape. Pass an array of `{ typeDefs, resolvers }` modules (or a bare `DocumentNode`) instead:

```diff
- buildSubgraphSchema({ typeDefs, resolvers })
+ buildSubgraphSchema([{ typeDefs, resolvers }])
```