Skip to content

Upcoming Release Changes#181

Merged
n1ru4l merged 1 commit intomainfrom
changeset-release/main
Sep 15, 2025
Merged

Upcoming Release Changes#181
n1ru4l merged 1 commit intomainfrom
changeset-release/main

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release 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 a208f1c Thanks @n1ru4l! - Add composeSchemaContract function for composing schema contracts.

    Running the following script:

    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:

    type Query {
      a: String!
    }

@n1ru4l n1ru4l merged commit 8593e38 into main Sep 15, 2025
@n1ru4l n1ru4l deleted the changeset-release/main branch September 15, 2025 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant