A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://graphcms.com/docs/api-reference/content-api/ordering below:

Ordering | Hygraph

#Ordering #Overview

When fetching multiple entries you can use the orderBy argument to define the order of the returned records.

You can order results by all System Fields, and any non-relational custom field you define in your model, either ascending, or descending.

#Order by types Input Type Description [fieldName]_ASC Order results by fieldName ascending. [fieldName]_DESC Order results by fieldName descending.

You can only use one inputType with orderBy to order results.

#Nested ordering

You can also use the orderBy with any nested relations. For example, let's imagine our post has a authors relation. The same orderBy rules apply.

{

posts {

id

createdAt

relatedPosts(orderBy: createdAt_DESC) {

id

createdAt

}

}

}


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4