CRUDSchemaObject
@index
Use the @index directive to apply a db index on a list of fields in order to make queries more performant.
This directive exists on field level as well: @index
You cannot create a multi column index on fields that contain array data.
Example
type User @crudType @index(fields: ["name", "lastName"]) {
name: String!
lastName: String!
}In this case Freym will create a composite database index on the name and lastName fields.