Skip to content

Commit

Permalink
Merge pull request #3084 from apollographql/version-2.8.3-beta
Browse files Browse the repository at this point in the history
Update `main` with `version-2.8.3-beta`
  • Loading branch information
sachindshinde authored Jul 12, 2024
2 parents 6b1d14d + 42aac5f commit d6b707a
Show file tree
Hide file tree
Showing 40 changed files with 1,100 additions and 525 deletions.
6 changes: 6 additions & 0 deletions .changeset/afraid-phones-reflect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@apollo/composition": patch
"@apollo/query-graphs": patch
---

Error messages are now lazily evaluated for satisfiability validations.
5 changes: 5 additions & 0 deletions .changeset/empty-seahorses-melt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@apollo/federation-internals": patch
---

dummy commit to force beta.2
7 changes: 7 additions & 0 deletions .changeset/friendly-tables-mix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@apollo/composition": patch
"@apollo/query-planner": patch
"@apollo/query-graphs": patch
---

Query graph caches now use maps instead of sparsely-populated arrays for per-subgraph data.
5 changes: 5 additions & 0 deletions .changeset/good-shoes-chew.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@apollo/composition": patch
---

Add a fast path to skip override validation for fields without any subgraph `@override`s.
5 changes: 5 additions & 0 deletions .changeset/many-cats-prove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@apollo/federation-internals": patch
---

For very large graphs cloning types with lots of join directives can be expensive. Since these directives will not be used in the Schema that is cloned for toAPISchema(), add the ability to optionally omit them
24 changes: 24 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"mode": "exit",
"tag": "beta",
"initialVersions": {
"@apollo/composition": "2.8.2",
"apollo-federation-integration-testsuite": "2.8.2",
"@apollo/gateway": "2.8.2",
"@apollo/federation-internals": "2.8.2",
"@apollo/query-graphs": "2.8.2",
"@apollo/query-planner": "2.8.2",
"@apollo/subgraph": "2.8.2"
},
"changesets": [
"afraid-phones-reflect",
"empty-seahorses-melt",
"friendly-tables-mix",
"good-shoes-chew",
"many-cats-prove",
"smooth-melons-study",
"violet-wasps-cry",
"wild-guests-notice",
"wise-donkeys-deliver"
]
}
5 changes: 5 additions & 0 deletions .changeset/smooth-melons-study.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@apollo/composition": patch
---

Type merging now uses maps instead of sparsely-populated arrays for per-subgraph data.
5 changes: 5 additions & 0 deletions .changeset/violet-wasps-cry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@apollo/composition": patch
---

Stop duplicating hints for inconsistent value type fields per subgraph.
4 changes: 4 additions & 0 deletions .changeset/wild-guests-notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@apollo/composition": patch
---
Fix logic to compute missing subgraphs when generating composition hints/errors
7 changes: 7 additions & 0 deletions .changeset/wise-donkeys-deliver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@apollo/federation-internals": patch
"@apollo/composition": patch
"@apollo/query-planner": patch
---

Use sets instead of arrays for tracking schema type/directive referencers.
38 changes: 38 additions & 0 deletions composition-js/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
# CHANGELOG for `@apollo/composition`

## 2.8.3-beta.2

### Patch Changes

- Updated dependencies [[`50d648ccffb05591878de75dc5522914ed48698f`](https://github.com/apollographql/federation/commit/50d648ccffb05591878de75dc5522914ed48698f)]:
- @apollo/federation-internals@2.8.3-beta.2
- @apollo/query-graphs@2.8.3-beta.2

## 2.8.3-beta.1

### Patch Changes

- Fix logic to compute missing subgraphs when generating composition hints/errors ([#3076](https://github.com/apollographql/federation/pull/3076))

- Updated dependencies []:
- @apollo/federation-internals@2.8.3-beta.1
- @apollo/query-graphs@2.8.3-beta.1

## 2.8.3-beta.0

### Patch Changes

- Error messages are now lazily evaluated for satisfiability validations. ([#3068](https://github.com/apollographql/federation/pull/3068))

- Query graph caches now use maps instead of sparsely-populated arrays for per-subgraph data. ([#3066](https://github.com/apollographql/federation/pull/3066))

- Add a fast path to skip override validation for fields without any subgraph `@override`s. ([#3070](https://github.com/apollographql/federation/pull/3070))

- Type merging now uses maps instead of sparsely-populated arrays for per-subgraph data. ([#3069](https://github.com/apollographql/federation/pull/3069))

- Stop duplicating hints for inconsistent value type fields per subgraph. ([#3071](https://github.com/apollographql/federation/pull/3071))

- Use sets instead of arrays for tracking schema type/directive referencers. ([#3067](https://github.com/apollographql/federation/pull/3067))

- Updated dependencies [[`38debcf2f9af1a719bd1c8acbd9335efa8427ddb`](https://github.com/apollographql/federation/commit/38debcf2f9af1a719bd1c8acbd9335efa8427ddb), [`860aace9904e787f9bf05aad94be5b5920f10543`](https://github.com/apollographql/federation/commit/860aace9904e787f9bf05aad94be5b5920f10543), [`f753d55e9a49d11389ee4f8d7976533447e95ede`](https://github.com/apollographql/federation/commit/f753d55e9a49d11389ee4f8d7976533447e95ede), [`3af790517d662f3bec9064c0bf243014c579e9cd`](https://github.com/apollographql/federation/commit/3af790517d662f3bec9064c0bf243014c579e9cd)]:
- @apollo/query-graphs@2.8.3-beta.0
- @apollo/federation-internals@2.8.3-beta.0

## 2.8.2

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions composition-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@apollo/composition",
"version": "2.8.2",
"version": "2.8.3-beta.2",
"description": "Apollo Federation composition utilities",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand All @@ -27,8 +27,8 @@
"access": "public"
},
"dependencies": {
"@apollo/federation-internals": "2.8.2",
"@apollo/query-graphs": "2.8.2"
"@apollo/federation-internals": "2.8.3-beta.2",
"@apollo/query-graphs": "2.8.3-beta.2"
},
"peerDependencies": {
"graphql": "^16.5.0"
Expand Down
5 changes: 3 additions & 2 deletions composition-js/src/composeDirectiveManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
import { GraphQLError } from 'graphql';
import { CompositionHint, HINTS } from './hints';
import { MismatchReporter } from './merging/reporter';
import { sourcesFromArray } from './merging';

/**
* Return true if the directive from the same core feature has a different name in the subgraph
Expand Down Expand Up @@ -367,7 +368,7 @@ export class ComposeDirectiveManager {
this.mismatchReporter.reportMismatchErrorWithoutSupergraph(
ERRORS.DIRECTIVE_COMPOSITION_ERROR,
'Composed directive is not named consistently in all subgraphs',
this.subgraphs.values()
sourcesFromArray(this.subgraphs.values()
.map(sg => {
const item = items.find(item => sg.name === item.sgName);
return item ? {
Expand All @@ -384,7 +385,7 @@ export class ComposeDirectiveManager {
sourceAST,
item: val.item,
} : undefined;
}),
})),
(elt) => elt ? `"@${elt.item.directiveNameAs}"` : undefined
);
}
Expand Down
2 changes: 1 addition & 1 deletion composition-js/src/merging/coreDirectiveCollector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function collectCoreDirectivesToCompose(
const source = features.sourceFeature(directive);
// We ignore directives that are not "core" ones, or the ones that are defined but unused (note that this
// happen to ignore execution directives as a by-product)
if (!source || directive.applications().length === 0) {
if (!source || directive.applications().size === 0) {
continue;
}

Expand Down
Loading

0 comments on commit d6b707a

Please sign in to comment.