From ad08f1dce752e196f8475b3056591577ea77bd12 Mon Sep 17 00:00:00 2001 From: Sunli Date: Thu, 1 Oct 2020 11:24:30 +0800 Subject: [PATCH] Update docs --- docs/en/src/define_union.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/src/define_union.md b/docs/en/src/define_union.md index c5ed4952..4169c6da 100644 --- a/docs/en/src/define_union.md +++ b/docs/en/src/define_union.md @@ -50,7 +50,7 @@ enum Shape { A restriction in GraphQL is the inability to create a union type out of other union types. All members must be `Object`. To support nested unions, we can "flatten" members that are unions, bringing their members up -into the parent union. This is done by applying `#[item(flatten)]` on each +into the parent union. This is done by applying `#[graphql(flatten)]` on each member we want to flatten. ```rust @@ -59,7 +59,7 @@ pub enum TopLevelUnion { A(A), // Will fail to compile unless we flatten the union member - #[item(flatten)] + #[graphql(flatten)] B(B), }