Skip to content

Commit

Permalink
Merge branch 'next' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
tninesling authored Aug 27, 2024
2 parents f9b5f65 + e0a5075 commit dcf6206
Show file tree
Hide file tree
Showing 57 changed files with 3,277 additions and 2,596 deletions.
6 changes: 6 additions & 0 deletions .changeset/cuddly-badgers-sit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@apollo/gateway": patch
"@apollo/query-graphs": patch
---

Avoid type explosion for inline fragments where the type condition is an interface that implements the parent type.
7 changes: 7 additions & 0 deletions .changeset/fast-points-wonder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@apollo/federation-internals": patch
"@apollo/gateway": patch
"@apollo/composition": patch
---

Reduce memory overhead during satisfiability checking when there are many options.
6 changes: 6 additions & 0 deletions .changeset/happy-bats-exist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@apollo/composition": minor
"@apollo/federation-internals": minor
---

Implements two new directives for defining custom costs for demand control. The `@cost` directive allows setting a custom weight to a particular field in the graph, overriding the default cost calculation. The `@listSize` directive gives the cost calculator information about how to estimate the size of lists returned by subgraphs. This can either be a static size or a value derived from input arguments, such as paging parameters.
6 changes: 6 additions & 0 deletions .changeset/poor-seahorses-whisper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@apollo/query-planner": patch
"@apollo/federation-internals": patch
---

Fix issue where variable was not passed into subgraph when embedded in a fragment
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ node_modules/

# Local Netlify folder
.netlify

# JetBrains IDE config
.idea/
10 changes: 0 additions & 10 deletions .idea/.gitignore

This file was deleted.

5 changes: 0 additions & 5 deletions .idea/codeStyles/codeStyleConfig.xml

This file was deleted.

1,313 changes: 0 additions & 1,313 deletions .idea/inspectionProfiles/Project_Default.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/jsLibraryMappings.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/misc.xml

This file was deleted.

15 changes: 0 additions & 15 deletions .idea/modules.xml

This file was deleted.

11 changes: 0 additions & 11 deletions .idea/modules/composition-js.iml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules/docs.iml

This file was deleted.

10 changes: 0 additions & 10 deletions .idea/modules/federation-integration-testsuite-js.iml

This file was deleted.

16 changes: 0 additions & 16 deletions .idea/modules/gateway-js.iml

This file was deleted.

11 changes: 0 additions & 11 deletions .idea/modules/internals-js.iml

This file was deleted.

11 changes: 0 additions & 11 deletions .idea/modules/query-graphs-js.iml

This file was deleted.

12 changes: 0 additions & 12 deletions .idea/modules/query-planner-js.iml

This file was deleted.

11 changes: 0 additions & 11 deletions .idea/modules/subgraph-js.iml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

2 changes: 1 addition & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = {
requirePragma: true,
overrides: [
{
files: '{docs/{,source/**},.,{gateway-js,federation-integration-testsuite-js,query-planner-js,subgraph-js}/**,test}/{*.js,*.ts}',
files: '{docs/{,source/**},.,{gateway-js,federation-integration-testsuite-js,query-planner-js,subgraph-js,internals-js}/**,test}/{*.js,*.ts}',
options: {
requirePragma: false,
trailingComma: 'all',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports[`composing custom core directives custom tag directive works when federa
"schema
@link(url: \\"https://specs.apollo.dev/link/v1.0\\")
@link(url: \\"https://specs.apollo.dev/join/v0.3\\", for: EXECUTION)
@link(url: \\"https://specs.apollo.dev/tag/v0.3\\", as: \\"mytag\\")
@link(url: \\"https://specs.apollo.dev/tag/v0.3\\", import: [{name: \\"@tag\\", as: \\"@mytag\\"}])
@link(url: \\"https://custom.dev/tag/v1.0\\", import: [\\"@tag\\"])
{
query: Query
Expand Down
6 changes: 3 additions & 3 deletions composition-js/src/__tests__/compose.composeDirective.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ describe('composing custom core directives', () => {
expect(errors(result)).toStrictEqual([
[
'DIRECTIVE_COMPOSITION_ERROR',
'Could not find matching directive definition for argument to @composeDirective "@fooz" in subgraph "subgraphA". Did you mean "@foo"?',
'Could not find matching directive definition for argument to @composeDirective "@fooz" in subgraph "subgraphA". Did you mean "@foo" or "@cost"?',
]
]);
});
Expand Down Expand Up @@ -926,8 +926,8 @@ describe('composing custom core directives', () => {
expectCoreFeature(schema, 'https://custom.dev/tag', '1.0', [{ name: '@tag' }]);
const feature = schema.coreFeatures?.getByIdentity('https://specs.apollo.dev/tag');
expect(feature?.url.toString()).toBe('https://specs.apollo.dev/tag/v0.3');
expect(feature?.imports).toEqual([]);
expect(feature?.nameInSchema).toEqual('mytag');
expect(feature?.imports).toEqual([{ name: '@tag', as: '@mytag' }]);
expect(feature?.nameInSchema).toEqual('tag');
expect(printSchema(schema)).toMatchSnapshot();
});

Expand Down
Loading

0 comments on commit dcf6206

Please sign in to comment.