Concepts

Query

Query string parameters (`ctx.query`) parsed from the request URL, with validation/coercion via `SCHEMA`.

Query

ctx.query is the parsed query string as a simple object:

  • keys come from query parameter names
  • values are strings

When you define SCHEMA.query (or GET_SCHEMA.query, etc.), Legonode validates/coerces the query and then replaces ctx.query with the parsed values so your handler works with the validated types.

On this page