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! +} +``` + +
+