nuwave / lighthouse

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

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

Closed spawnia closed 3 months ago

spawnia commented 3 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.