Commit 8593e38
authored
Upcoming Release Changes (#181)
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/[email protected]
### 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>1 parent a208f1c commit 8593e38
3 files changed
+54
-53
lines changedThis file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
3 | 56 | | |
4 | 57 | | |
5 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments