Skip to content

Commit

Permalink
chore(release): update monorepo packages versions (#6094)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
theguild-bot and github-actions[bot] committed Apr 26, 2024
1 parent b0343f9 commit 3d5323d
Show file tree
Hide file tree
Showing 11 changed files with 376 additions and 159 deletions.
34 changes: 0 additions & 34 deletions .changeset/fresh-kangaroos-exist.md

This file was deleted.

97 changes: 0 additions & 97 deletions .changeset/many-ads-run.md

This file was deleted.

19 changes: 0 additions & 19 deletions .changeset/old-starfishes-shop.md

This file was deleted.

8 changes: 8 additions & 0 deletions benchmark/federation/CHANGELOG.md
@@ -1,5 +1,13 @@
# federation-benchmark

## 0.0.129

### Patch Changes

- Updated dependencies [[`9bca9e0`](https://github.com/ardatan/graphql-tools/commit/9bca9e03915a2e12d164e355be9aed389b0de3a4), [`9bca9e0`](https://github.com/ardatan/graphql-tools/commit/9bca9e03915a2e12d164e355be9aed389b0de3a4), [`243c353`](https://github.com/ardatan/graphql-tools/commit/243c353412921cf0063f963ee46b9c63d2f33b41)]:
- @graphql-tools/stitch@9.2.0
- @graphql-tools/federation@1.1.28

## 0.0.128

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions benchmark/federation/package.json
@@ -1,6 +1,6 @@
{
"name": "federation-benchmark",
"version": "0.0.128",
"version": "0.0.129",
"private": true,
"scripts": {
"loadtest:federation": "k6 -e ENDPOINT=federation run k6.js",
Expand All @@ -11,8 +11,8 @@
"dependencies": {
"@apollo/gateway": "2.7.4",
"@apollo/subgraph": "2.7.4",
"@graphql-tools/federation": "1.1.27",
"@graphql-tools/stitch": "9.1.2",
"@graphql-tools/federation": "1.1.28",
"@graphql-tools/stitch": "9.2.0",
"cross-env": "7.0.3",
"express": "4.19.2",
"graphql": "16.8.1",
Expand Down
112 changes: 112 additions & 0 deletions packages/delegate/CHANGELOG.md
@@ -1,5 +1,117 @@
# @graphql-tools/delegate

## 10.0.5

### Patch Changes

- [#6091](https://github.com/ardatan/graphql-tools/pull/6091) [`9bca9e0`](https://github.com/ardatan/graphql-tools/commit/9bca9e03915a2e12d164e355be9aed389b0de3a4) Thanks [@User](https://github.com/User), [@User](https://github.com/User)! - If the gateway receives a query with an overlapping fields for the subschema, it uses aliases to resolve it correctly.

Let's say subschema A has the following schema;

```graphql
type Query {

}

interface User {
id: ID!
name: String!
}

type Admin implements User {
id: ID!
name: String!
role: String!
}

type Customer implements User {
id: ID!
name: String
email: String
}
```

And let's say the gateway has the following schema instead;

```graphql
type Query {

}

interface User {
id: ID!
name: String!
}

type Admin implements User {
id: ID!
name: String!
role: String!
}

type Customer implements User {
id: ID!
name: String!
email: String!
}
```

In this case, the following query is fine for the gateway but for the subschema, it's not;

```graphql
query {
user {
... on Admin {
id
name # This is nullable in the subschema
role
}
... on Customer {
id
name # This is non-nullable in the subschema
email
}
}
}
```

So the subgraph will throw based on this rule [OverlappingFieldsCanBeMerged](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/OverlappingFieldsCanBeMergedRule.ts)

To avoid this, the gateway will use aliases to resolve the query correctly. The query will be transformed to the following;

```graphql
query {
user {
... on Admin {
id
name # This is nullable in the subschema
role
}
... on Customer {
id
name: _nullable_name # This is non-nullable in the subschema
email
}
}
}
```

- [#6092](https://github.com/ardatan/graphql-tools/pull/6092) [`243c353`](https://github.com/ardatan/graphql-tools/commit/243c353412921cf0063f963ee46b9c63d2f33b41) Thanks [@ardatan](https://github.com/ardatan)! - If one of the subgraphs are already able to resolve a nested field as in `parent-entity-call` example's `Category.details` from C's `Product`, resolve it from there instead of using type merging.

```graphql
query {
product {
category {
details {
# This is coming from C's Product, so resolve it from there instead of Type Merging
id
name
}
}
}
}
```

## 10.0.4

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/delegate/package.json
@@ -1,6 +1,6 @@
{
"name": "@graphql-tools/delegate",
"version": "10.0.4",
"version": "10.0.5",
"type": "module",
"description": "A set of utils for faster development of GraphQL tools",
"repository": {
Expand Down

0 comments on commit 3d5323d

Please sign in to comment.