From ea9a5e545a9a2d1bb668c5a9589128ae0f0f8f98 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 23:07:35 -0500 Subject: [PATCH] Automated PR for router-bridge release 2.8.0-alpha.0 (#489) Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action --------- Co-authored-by: apollo-bot2 Co-authored-by: Chris Lenfest --- federation-2/Cargo.lock | 2 +- federation-2/router-bridge/Cargo.toml | 2 +- .../js-src/supported_features.ts | 2 ++ federation-2/router-bridge/package-lock.json | 32 +++++++++---------- federation-2/router-bridge/package.json | 6 ++-- ...r_bridge__planner__tests__subgraphs-2.snap | 7 +++- ...r_bridge__planner__tests__subgraphs-3.snap | 7 +++- ...r_bridge__planner__tests__subgraphs-4.snap | 7 +++- ...r_bridge__planner__tests__subgraphs-5.snap | 7 +++- ...r_bridge__planner__tests__subgraphs-6.snap | 7 +++- ...ter_bridge__planner__tests__subgraphs.snap | 7 +++- 11 files changed, 59 insertions(+), 27 deletions(-) diff --git a/federation-2/Cargo.lock b/federation-2/Cargo.lock index 85788f4af..805ce0563 100644 --- a/federation-2/Cargo.lock +++ b/federation-2/Cargo.lock @@ -1926,7 +1926,7 @@ dependencies = [ [[package]] name = "router-bridge" -version = "0.5.22+v2.7.8" +version = "0.5.23+v2.8.0-alpha.0" dependencies = [ "anyhow", "async-channel", diff --git a/federation-2/router-bridge/Cargo.toml b/federation-2/router-bridge/Cargo.toml index b8bec5c3c..d738f6620 100644 --- a/federation-2/router-bridge/Cargo.toml +++ b/federation-2/router-bridge/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "router-bridge" -version = "0.5.22+v2.7.8" +version = "0.5.23+v2.8.0-alpha.0" authors = ["Apollo "] edition = "2018" description = "JavaScript bridge for the Apollo Router" diff --git a/federation-2/router-bridge/js-src/supported_features.ts b/federation-2/router-bridge/js-src/supported_features.ts index 3dd20e2b3..65c450974 100644 --- a/federation-2/router-bridge/js-src/supported_features.ts +++ b/federation-2/router-bridge/js-src/supported_features.ts @@ -6,6 +6,7 @@ import { POLICY_VERSIONS, REQUIRES_SCOPES_VERSIONS, SOURCE_VERSIONS, + CONTEXT_VERSIONS, } from "@apollo/federation-internals"; export const ROUTER_SUPPORTED_SUPERGRAPH_FEATURES: Set = new Set( @@ -30,3 +31,4 @@ addToRouterFeatures(AUTHENTICATED_VERSIONS); addToRouterFeatures(REQUIRES_SCOPES_VERSIONS); addToRouterFeatures(POLICY_VERSIONS); addToRouterFeatures(SOURCE_VERSIONS); +addToRouterFeatures(CONTEXT_VERSIONS); diff --git a/federation-2/router-bridge/package-lock.json b/federation-2/router-bridge/package-lock.json index 73ba6a774..48824709a 100644 --- a/federation-2/router-bridge/package-lock.json +++ b/federation-2/router-bridge/package-lock.json @@ -1,17 +1,17 @@ { "name": "@apollo/router-bridge", - "version": "2.7.8", + "version": "2.8.0-alpha.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@apollo/router-bridge", - "version": "2.7.8", + "version": "2.8.0-alpha.0", "license": "Elastic-2.0", "dependencies": { "@apollo/core-schema": "^0.3.0", - "@apollo/federation-internals": "^2.7.8", - "@apollo/query-planner": "^2.7.8", + "@apollo/federation-internals": "^2.8.0-alpha.0", + "@apollo/query-planner": "^2.8.0-alpha.0", "@apollo/usage-reporting-protobuf": "^4.0.0", "@apollo/utils.usagereporting": "^3.0.0", "graphql": "16.6.0" @@ -47,9 +47,9 @@ } }, "node_modules/@apollo/federation-internals": { - "version": "2.7.8", - "resolved": "https://registry.npmjs.org/@apollo/federation-internals/-/federation-internals-2.7.8.tgz", - "integrity": "sha512-LET8YGJ/paYKx2WFqdmWKgQ++kRMwRQ80qNF3z9DNoUN029/qXoh+t433IB2TNtV4WCtN0btNog5DOgVUaXrog==", + "version": "2.8.0-alpha.0", + "resolved": "https://registry.npmjs.org/@apollo/federation-internals/-/federation-internals-2.8.0-alpha.0.tgz", + "integrity": "sha512-k6wk9rFE0qoikQlgi133oHtugc51ggiVj5cVG7X4xgktxfMHQq8edRomqXih/lFtmBDzEciO6siYiaDW/XXviA==", "dependencies": { "@types/uuid": "^9.0.0", "chalk": "^4.1.0", @@ -88,11 +88,11 @@ } }, "node_modules/@apollo/query-graphs": { - "version": "2.7.8", - "resolved": "https://registry.npmjs.org/@apollo/query-graphs/-/query-graphs-2.7.8.tgz", - "integrity": "sha512-W0D0qGviHb+DJjd32KcQ7r4WQpM3CO5s19XhkR+OegrYRi0nzEXT8uEclV+Vy/GfAi9ZcHFm7Rz8u2AkS9Djsw==", + "version": "2.8.0-alpha.0", + "resolved": "https://registry.npmjs.org/@apollo/query-graphs/-/query-graphs-2.8.0-alpha.0.tgz", + "integrity": "sha512-CR2jjaoYsqr2VjlvGLywRzNK4/ovFfMAU5AR3sMiF1tHpahKR21iB05DL50K5Y8KunywV47oz0GysrCTgRwiOw==", "dependencies": { - "@apollo/federation-internals": "2.7.8", + "@apollo/federation-internals": "2.8.0-alpha.0", "deep-equal": "^2.0.5", "ts-graphviz": "^1.5.4", "uuid": "^9.0.0" @@ -105,12 +105,12 @@ } }, "node_modules/@apollo/query-planner": { - "version": "2.7.8", - "resolved": "https://registry.npmjs.org/@apollo/query-planner/-/query-planner-2.7.8.tgz", - "integrity": "sha512-J+MMqzjXVe6z222eUiuG77oebeIj+gyj5y3cSnkn3qAWryrwLzSWCxSy11rdWBwpaw9ynfgOhVQdc6LbaRf8aw==", + "version": "2.8.0-alpha.0", + "resolved": "https://registry.npmjs.org/@apollo/query-planner/-/query-planner-2.8.0-alpha.0.tgz", + "integrity": "sha512-KcRTgOtUEhI8F9SP/tqbjHTfrq5CUZ1iZlZMVjRPZdbyCfWxIohkHdMw9Lhq8Ch47Tf8647RUMm9u96QT10eng==", "dependencies": { - "@apollo/federation-internals": "2.7.8", - "@apollo/query-graphs": "2.7.8", + "@apollo/federation-internals": "2.8.0-alpha.0", + "@apollo/query-graphs": "2.8.0-alpha.0", "@apollo/utils.keyvaluecache": "^2.1.0", "chalk": "^4.1.0", "deep-equal": "^2.0.5", diff --git a/federation-2/router-bridge/package.json b/federation-2/router-bridge/package.json index deb99ba76..8bf65de81 100644 --- a/federation-2/router-bridge/package.json +++ b/federation-2/router-bridge/package.json @@ -1,7 +1,7 @@ { "name": "@apollo/router-bridge", "private": true, - "version": "2.7.8", + "version": "2.8.0-alpha.0", "description": "Apollo Router JS Bridge Entrypoint", "scripts": { "build": "make-dir bundled js-dist && rm -f tsconfig.tsbuildinfo && tsc --build --verbose && node esbuild/bundler.js && cp js-dist/runtime.js js-dist/do_api_schema.js js-dist/do_introspect.js js-dist/plan_worker.js js-dist/test_logger_worker.js js-dist/test_get_random_values.js js-dist/test_url.js bundled/", @@ -28,8 +28,8 @@ }, "dependencies": { "@apollo/core-schema": "^0.3.0", - "@apollo/federation-internals": "^2.7.8", - "@apollo/query-planner": "^2.7.8", + "@apollo/federation-internals": "^2.8.0-alpha.0", + "@apollo/query-planner": "^2.8.0-alpha.0", "@apollo/usage-reporting-protobuf": "^4.0.0", "@apollo/utils.usagereporting": "^3.0.0", "graphql": "16.6.0" diff --git a/federation-2/router-bridge/src/snapshots/router_bridge__planner__tests__subgraphs-2.snap b/federation-2/router-bridge/src/snapshots/router_bridge__planner__tests__subgraphs-2.snap index d2ad6c798..0cf0978a3 100644 --- a/federation-2/router-bridge/src/snapshots/router_bridge__planner__tests__subgraphs-2.snap +++ b/federation-2/router-bridge/src/snapshots/router_bridge__planner__tests__subgraphs-2.snap @@ -1,6 +1,5 @@ --- source: router-bridge/src/planner.rs -assertion_line: 1784 expression: schema --- directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA @@ -39,6 +38,10 @@ directive @federation__sourceType repeatable on OBJECT | INTERFACE directive @federation__sourceField repeatable on FIELD_DEFINITION +directive @federation__context(name: String!) repeatable on INTERFACE | OBJECT | UNION + +directive @federation__fromContext(field: federation__ContextFieldValue) on ARGUMENT_DEFINITION + directive @stream on FIELD directive @transform(from: String!) on FIELD @@ -63,6 +66,8 @@ scalar federation__Scope scalar federation__Policy +scalar federation__ContextFieldValue + type Book implements Product { isbn: String! title: String diff --git a/federation-2/router-bridge/src/snapshots/router_bridge__planner__tests__subgraphs-3.snap b/federation-2/router-bridge/src/snapshots/router_bridge__planner__tests__subgraphs-3.snap index 96203dc85..6b82ef724 100644 --- a/federation-2/router-bridge/src/snapshots/router_bridge__planner__tests__subgraphs-3.snap +++ b/federation-2/router-bridge/src/snapshots/router_bridge__planner__tests__subgraphs-3.snap @@ -1,6 +1,5 @@ --- source: router-bridge/src/planner.rs -assertion_line: 1784 expression: schema --- directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA @@ -39,6 +38,10 @@ directive @federation__sourceType repeatable on OBJECT | INTERFACE directive @federation__sourceField repeatable on FIELD_DEFINITION +directive @federation__context(name: String!) repeatable on INTERFACE | OBJECT | UNION + +directive @federation__fromContext(field: federation__ContextFieldValue) on ARGUMENT_DEFINITION + directive @stream on FIELD directive @transform(from: String!) on FIELD @@ -63,6 +66,8 @@ scalar federation__Scope scalar federation__Policy +scalar federation__ContextFieldValue + union Body = Image | Text type Image implements NamedObject { diff --git a/federation-2/router-bridge/src/snapshots/router_bridge__planner__tests__subgraphs-4.snap b/federation-2/router-bridge/src/snapshots/router_bridge__planner__tests__subgraphs-4.snap index 9eb81a51c..e4c390d89 100644 --- a/federation-2/router-bridge/src/snapshots/router_bridge__planner__tests__subgraphs-4.snap +++ b/federation-2/router-bridge/src/snapshots/router_bridge__planner__tests__subgraphs-4.snap @@ -1,6 +1,5 @@ --- source: router-bridge/src/planner.rs -assertion_line: 1784 expression: schema --- directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA @@ -39,6 +38,10 @@ directive @federation__sourceType repeatable on OBJECT | INTERFACE directive @federation__sourceField repeatable on FIELD_DEFINITION +directive @federation__context(name: String!) repeatable on INTERFACE | OBJECT | UNION + +directive @federation__fromContext(field: federation__ContextFieldValue) on ARGUMENT_DEFINITION + directive @stream on FIELD directive @transform(from: String!) on FIELD @@ -63,6 +66,8 @@ scalar federation__Scope scalar federation__Policy +scalar federation__ContextFieldValue + type Book implements Product { inStock: Boolean isCheckedOut: Boolean diff --git a/federation-2/router-bridge/src/snapshots/router_bridge__planner__tests__subgraphs-5.snap b/federation-2/router-bridge/src/snapshots/router_bridge__planner__tests__subgraphs-5.snap index dce4e82f2..dd1681a21 100644 --- a/federation-2/router-bridge/src/snapshots/router_bridge__planner__tests__subgraphs-5.snap +++ b/federation-2/router-bridge/src/snapshots/router_bridge__planner__tests__subgraphs-5.snap @@ -1,6 +1,5 @@ --- source: router-bridge/src/planner.rs -assertion_line: 1784 expression: schema --- directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA @@ -39,6 +38,10 @@ directive @federation__sourceType repeatable on OBJECT | INTERFACE directive @federation__sourceField repeatable on FIELD_DEFINITION +directive @federation__context(name: String!) repeatable on INTERFACE | OBJECT | UNION + +directive @federation__fromContext(field: federation__ContextFieldValue) on ARGUMENT_DEFINITION + directive @stream on FIELD directive @transform(from: String!) on FIELD @@ -63,6 +66,8 @@ scalar federation__Scope scalar federation__Policy +scalar federation__ContextFieldValue + type Amazon { referrer: String } diff --git a/federation-2/router-bridge/src/snapshots/router_bridge__planner__tests__subgraphs-6.snap b/federation-2/router-bridge/src/snapshots/router_bridge__planner__tests__subgraphs-6.snap index 75a65b583..c84c890fd 100644 --- a/federation-2/router-bridge/src/snapshots/router_bridge__planner__tests__subgraphs-6.snap +++ b/federation-2/router-bridge/src/snapshots/router_bridge__planner__tests__subgraphs-6.snap @@ -1,6 +1,5 @@ --- source: router-bridge/src/planner.rs -assertion_line: 1784 expression: schema --- directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA @@ -39,6 +38,10 @@ directive @federation__sourceType repeatable on OBJECT | INTERFACE directive @federation__sourceField repeatable on FIELD_DEFINITION +directive @federation__context(name: String!) repeatable on INTERFACE | OBJECT | UNION + +directive @federation__fromContext(field: federation__ContextFieldValue) on ARGUMENT_DEFINITION + directive @stream on FIELD directive @transform(from: String!) on FIELD @@ -63,6 +66,8 @@ scalar federation__Scope scalar federation__Policy +scalar federation__ContextFieldValue + type Book implements Product { reviews: [Review] relatedReviews: [Review!]! diff --git a/federation-2/router-bridge/src/snapshots/router_bridge__planner__tests__subgraphs.snap b/federation-2/router-bridge/src/snapshots/router_bridge__planner__tests__subgraphs.snap index 2c43ff44b..d9be3ec48 100644 --- a/federation-2/router-bridge/src/snapshots/router_bridge__planner__tests__subgraphs.snap +++ b/federation-2/router-bridge/src/snapshots/router_bridge__planner__tests__subgraphs.snap @@ -1,6 +1,5 @@ --- source: router-bridge/src/planner.rs -assertion_line: 1784 expression: schema --- directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA @@ -39,6 +38,10 @@ directive @federation__sourceType repeatable on OBJECT | INTERFACE directive @federation__sourceField repeatable on FIELD_DEFINITION +directive @federation__context(name: String!) repeatable on INTERFACE | OBJECT | UNION + +directive @federation__fromContext(field: federation__ContextFieldValue) on ARGUMENT_DEFINITION + directive @stream on FIELD directive @transform(from: String!) on FIELD @@ -63,6 +66,8 @@ scalar federation__Scope scalar federation__Policy +scalar federation__ContextFieldValue + union AccountType = PasswordAccount | SMSAccount type Library {