Merged
Conversation
Contributor
f1f7b4c to
0c553ba
Compare
57c22b0 to
92648c5
Compare
kamilkisiela
approved these changes
Sep 12, 2025
n1ru4l
pushed a commit
that referenced
this pull request
Sep 15, 2025
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @theguild/federation-composition@0.20.0 ### Minor Changes - [#180](#180) [`a208f1c`](a208f1c) Thanks [@n1ru4l](https://github.com/n1ru4l)! - Add `composeSchemaContract` function for composing schema contracts. Running the following script: ```ts import { composeSchemaContract } from "@theguild/federation-composition"; import { parse } from "graphql"; const result = composeSchemaContract( [ { name: "a", typeDefs: parse(/* GraphQL */ ` type Query { a: String @tag(name: "public") } `), url: "a.localhost", }, { name: "b", typeDefs: parse(/* GraphQL */ ` type Query { b: String } `), url: "b.localhost", }, ], /** Tags to include and exclude */ { include: new Set(["public"]), exclude: new Set(), }, /** Exclude unreachable types */ true, ); console.log(result.publicSdl); ``` Will result in the output containing only the fields tagged with `public`: ```graphql type Query { a: String! } ``` Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This was referenced Sep 17, 2025
n1ru4l
pushed a commit
that referenced
this pull request
Sep 18, 2025
This fixes a small issue with external fields not checking if `@external` is on the type/interface. Previously @ graphql-hive/console#6907 But the code was migrated here in #180
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds utility for composing a schema contract. We already had this code within Hive console, but it makes sense to move this here so people that do not use a schema registry can benefit from it as well.
See graphql-hive/console#6964