> For the complete documentation index, see [llms.txt](https://dzhelezov.gitbook.io/hydra/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dzhelezov.gitbook.io/hydra/hydra-docs/docs/schema-spec/the-query-goodies.md).

# The Goodies

The output schema automatically supports OpenCRUD filtering, pagination and ordering

## Filtering

All the scalar entity types enjoy first-class support in the output schema when it comes to filtering. The standard is known as [OpenCRUD](https://www.opencrud.org/) and dictates what the filtering should look like depending on the field type. For example, if the input schema defines the following type:

```graphql
type Person @entity {
    name: String!
    married: Boolean
    age: Int
    account: Bytes! @unique
    salary: BigInt
    interests: [String]
}
```

the output schema will support the following query:

```
query {
    persons(where: { name_startsWith: "Joh", age_gt: 20 }) {
      name
    }
}
```

## Pagination

All queries enjoy pagination support by accepting `offset` and `limit` input parameters. By default, `limit` is set to 5.

```graphql
query {
    persons(offset: 10, limit: 5) {
      name
    }
}
```

## Ordering

The results can also be ordered by any property with natural ordering. The `_DESC`and `_ASC` suffixes indicate the direction:

```graphql
query {
    persons(offset: 10, limit: 5, orderBy: name_ASC) {
      name
    }
}
```
