Homepage

QueryOptionsInput

Last edit: Nov 10, 2026

Per-query execution options. When several root fields of one operation pass
options, read_replica applies to the whole operation if any of them asks for it,
and the largest timeout wins

type QueryOptionsInput {
  read_replica: Boolean
  timeout: Int
}

Fields

read_replica (Boolean)

When true, the whole operation reads from the read replica database, when one
is configured and reachable; otherwise it reads from the primary database, as
it also does inside a transaction. Replica data can lag slightly behind recent writes.

timeout (Int)

Database statement timeout in seconds, applied to every database query of the
whole operation; must be greater than 0. Defaults to 19 seconds when options
is given. Inside a transaction the timeout of the transaction applies instead.

Questions?

We are always happy to help with any questions you may have.

contact us