Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/pages/lib/graphqlapi/relational/q/platform/[platform].mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ export const meta = {
description: `Learn more about how API (GraphQL) handles relationships between Models, such as "has one", "has many", "belongs to".`
};

<InlineFilter filters={["android"]}>

API (GraphQL) has the capability to handle relationships between Models, such as _has one_, _has many_, and _belongs to_. In Amplify GraphQL APIs, this is done with the `@hasOne`, `@hasMany` and `@belongsTo` directives as defined in the [GraphQL data modeling documentation](/cli/graphql/data-modeling).

By default, GraphQL APIs requests generate a selection set with a depth of 0. Connected relationship models are not returned in the initial request, but can be lazily loaded as needed with an additional API request. We provide mechanisms to customize the selection set, which allows connected relationships to be eagerly loaded on the initial request.
Expand Down Expand Up @@ -833,3 +835,5 @@ This query fetches a postEditor and eagerly loads its post and comments
</BlockSwitcher>

</InlineFilter>

</InlineFilter>