From 2088b1f62c10cf4cad363beb3df017434f906187 Mon Sep 17 00:00:00 2001 From: Trevor Scheer Date: Mon, 5 Feb 2024 10:18:42 -0800 Subject: [PATCH 1/2] Add new override hint --- .../shared/overridden-composition-rules.mdx | 46 ++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/src/content/shared/overridden-composition-rules.mdx b/src/content/shared/overridden-composition-rules.mdx index 406ccc228..032b83820 100644 --- a/src/content/shared/overridden-composition-rules.mdx +++ b/src/content/shared/overridden-composition-rules.mdx @@ -43,7 +43,7 @@ type Product @key(fields: "id") { The following example violates the rule: @@ -84,6 +84,50 @@ type Product @key(fields: "id") { + + +The following example violates the rule: + +```graphql title="❌ Subgraph A" disableCopy=true showLineNumbers=false {3} +type Product @key(fields: "id") { + id: ID! + inStock: Boolean! @override(from: "Subgraph B", label: "percent(50)") +} +``` + +```graphql title="❌ Subgraph B" disableCopy=true showLineNumbers=false {4} +type Product @key(fields: "id") { + id: ID! + name: String! + inStock: Boolean! +} +``` + +
+After completing the migration, use instead: +
+ +```graphql title="✅ Subgraph A" disableCopy=true showLineNumbers=false +type Product @key(fields: "id") { + id: ID! + name: String! + inStock: Boolean! +} +``` + +```graphql title="✅ Subgraph B" disableCopy=true showLineNumbers=false +type Product @key(fields: "id") { + id: ID! + name: String! +} +``` + +
+ Date: Mon, 5 Feb 2024 10:23:11 -0800 Subject: [PATCH 2/2] fix other overriden misspellings --- src/content/technotes/TN0001-client-id-enforcement.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/technotes/TN0001-client-id-enforcement.mdx b/src/content/technotes/TN0001-client-id-enforcement.mdx index 3b737b509..33b5c012c 100644 --- a/src/content/technotes/TN0001-client-id-enforcement.mdx +++ b/src/content/technotes/TN0001-client-id-enforcement.mdx @@ -15,7 +15,7 @@ Together, these pieces of information help teams monitor their graph and make ch ## Enforcing in Apollo Router -The Apollo Router supports client awareness by default if the client sets the `apollographql-client-name` and `apollographql-client-id` in their requests. These values can be overriden using the [router configuration file](/router/managed-federation/client-awareness/) directly. +The Apollo Router supports client awareness by default if the client sets the `apollographql-client-name` and `apollographql-client-id` in their requests. These values can be overridden using the [router configuration file](/router/managed-federation/client-awareness/) directly. Client headers can also be enforced using a [Rhai script](/router/customizations/rhai) on every incoming request.