nuwave / lighthouse

A framework for serving GraphQL from Laravel
https://lighthouse-php.com
MIT License
3.37k stars 437 forks source link

Add option `builder` to `@limit` to apply an actual `LIMIT` clause #2571

Closed spawnia closed 5 months ago

spawnia commented 5 months ago

Changes

If your field is resolved through a database query, you may add the builder argument to apply an actual LIMIT clause to your SQL:

type Query {
  users(limit: Int @limit(builder: true)): [User!]! @all
}

Breaking changes

None, the default behaviour is the same.