You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/reference/graphql-data-layer/schema-customization.md
+1-15
Original file line number
Diff line number
Diff line change
@@ -224,7 +224,7 @@ The types passed in are used to determine child relations of the node.
224
224
225
225
#### Defining child relations
226
226
227
-
The `@childOf` extensioncanbeusedtoexplicitlydefinewhatnodetypesormediatypesanodeisachildofandimmediatelyadd `child[MyType]` or `children[MyType]` asafieldontheparent.
227
+
The `@childOf` extensioncanbeusedtoexplicitlydefinewhatnodetypesormediatypesanodeisachildofandimmediatelyadd `child[MyType]` and `children[MyType]` fieldsontheparent.
228
228
229
229
The `types` argumenttakesanarrayofstringsanddetermineswhatnodetypesthenodeisachildof:
230
230
@@ -255,20 +255,6 @@ type Mdx implements Node
255
255
}
256
256
```
257
257
258
-
If `many: true` isset, theninsteadofcreatingasinglechildfieldontheparent, itwillcreatemultiple:
259
-
260
-
```graphql
261
-
# Adds `childMdx1` with type `Mdx1` to `File`.
262
-
typeMdx1implementsNode@childOf(types: ["File"]) {
263
-
id: ID!
264
-
}
265
-
266
-
# Adds `childrenMdx2` with type `[Mdx2]` as a field of `File`.
Copy file name to clipboardExpand all lines: docs/docs/schema-generation.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ This allows adding GraphQL Fields to any node type. This operates on GraphQL typ
38
38
39
39
## 4. Parent / children relationships
40
40
41
-
Nodes can be connected into _child-parent_ relationships either by using [`createParentChildLink`](/docs/reference/config-files/actions/#createParentChildLink) or by adding the `parent` field to raw node data. Child types can always access parent with the `parent` field in GraphQL. Parent types also get `children` fields as well as "convenience child fields" `child[TypeName]`or`children[TypeName]`.
41
+
Nodes can be connected into _child-parent_ relationships either by using [`createParentChildLink`](/docs/reference/config-files/actions/#createParentChildLink) or by adding the `parent` field to raw node data. Child types can always access parent with the `parent` field in GraphQL. Parent types also get `children` fields as well as "convenience child fields" `child[TypeName]`and`children[TypeName]`.
42
42
43
43
Children types are either inferred from data or created using `@childOf` directive, either by parent type name or by `mimeType` (only for File parent types).
0 commit comments