### Sort

Query results can also be sorted by one or more fields.

For example, to sort all `Post` objects by `rating` in ascending order: 

import js0 from "/src/fragments/lib/datastore/js/data-access/query-sort-snippet.mdx";

<Fragments fragments={{js: js0}} />

import ios1 from "/src/fragments/lib/datastore/ios/data-access/query-sort-snippet.mdx";

<Fragments fragments={{ios: ios1}} />

import android2 from "/src/fragments/lib/datastore/android/data-access/query-sort-snippet.mdx";

<Fragments fragments={{android: android2}} />

import flutter3 from "/src/fragments/lib/datastore/flutter/data-access/query-sort-snippet.mdx";

<Fragments fragments={{flutter: flutter3}} />

To get all `Post` objects sorted first by `rating` in ascending order, and then by `title` in descending order:

import js4 from "/src/fragments/lib/datastore/js/data-access/query-sort-multiple-snippet.mdx";

<Fragments fragments={{js: js4}} />

import ios5 from "/src/fragments/lib/datastore/ios/data-access/query-sort-multiple-snippet.mdx";

<Fragments fragments={{ios: ios5}} />

import android6 from "/src/fragments/lib/datastore/android/data-access/query-sort-multiple-snippet.mdx";

<Fragments fragments={{android: android6}} />

import flutter7 from "/src/fragments/lib/datastore/flutter/data-access/query-sort-multiple-snippet.mdx";

<Fragments fragments={{flutter: flutter7}} />