CRUD/Schema/Field
@index
Use the @index
directive to make a field filterable and sortable.
The GraphQL API will add this field to the filter, order and wait condition parameters.
Example
type User @crudType {
name: String! @index
}
In this case, the name
field will be available for filtering and sorting in the GraphQL API.‚