← API reference
CANONICAL TYPE REFERENCE

LuaSample

A Lua sample script with its source

idString!

Stable identifier, e.g. "graphql-list-customers"

titleString!

Short human-readable name, for a menu entry

One line saying what the sample demonstrates

Which scripting surface the sample is written against

RECIPE for task-shaped examples, SNIPPET for one function

apis[String!]!

Every ctx.* function the sample calls, derived from its source rather than declared

sourceString!

The runnable Lua source, front-matter stripped

entryString

The export to call on a DISPATCHING surface — handler for a webhook, a method name for a custom app. Null when the surface evaluates the chunk and uses its return value instead.

View exact SDL
"""A Lua sample script with its source"""
type LuaSample {
  """
  Stable identifier, e.g. "graphql-list-customers"
  """
  id: String!
  """Short human-readable name, for a menu entry"""
  title: String!
  """One line saying what the sample demonstrates"""
  description: String!
  """Which scripting surface the sample is written against"""
  role: LuaScriptRole!
  """RECIPE for task-shaped examples, SNIPPET for one function"""
  tier: LuaSampleTier!
  """
  Every ctx.* function the sample calls, derived from its source rather than declared
  """
  apis: [String!]!
  """The runnable Lua source, front-matter stripped"""
  source: String!
  """
  The export to call on a DISPATCHING surface — `handler` for a webhook, a method name for a custom app. Null when the surface evaluates the chunk and uses its return value instead.
  """
  entry: String
}

One stable address across all schema views. Follow a field’s type to explore connections between domains.