Liking cljdoc? Tell your friends :D

bff.scalar

Custom GraphQL scalar types.

A scalar declared in the spec's top-level scalars: list must have a matching implementation in the handler's :scalars extension map. Each implementation provides two fns:

• parse: input from client (string / number / etc.) → internal value. Throws on invalid input. • serialize: internal value → JSON primitive (String / Number / Boolean / nil).

The engine wires these into Lacinia's :scalars schema section at build-schema time.

Built-in convenience scalars for common date/time types are provided — {@code bff.scalar/date-time}, {@code bff.scalar/date}, {@code bff.scalar/local-date-time} — that users can drop into their config without writing parse/serialize themselves.

Custom GraphQL scalar types.

A scalar declared in the spec's top-level `scalars:` list must have a
matching implementation in the handler's :scalars extension map. Each
implementation provides two fns:

  • parse:     input from client (string / number / etc.) → internal value.
               Throws on invalid input.
  • serialize: internal value → JSON primitive
               (String / Number / Boolean / nil).

The engine wires these into Lacinia's :scalars schema section at
build-schema time.

Built-in convenience scalars for common date/time types are provided —
{@code bff.scalar/date-time}, {@code bff.scalar/date},
{@code bff.scalar/local-date-time} — that users can drop into their config
without writing parse/serialize themselves.
raw docstring

BffScalarcljprotocol

parseclj

(parse this value)

any → internal value; throw on invalid input

any → internal value; throw on invalid input

serializeclj

(serialize this value)

internal value → JSON primitive

internal value → JSON primitive
source

dateclj

GraphQL scalar for ISO-8601 calendar dates, backed by java.time.LocalDate. Round-trips "2026-07-30" ↔ LocalDate.

GraphQL scalar for ISO-8601 calendar dates, backed by java.time.LocalDate.
Round-trips "2026-07-30" ↔ LocalDate.
sourceraw docstring

date-timeclj

GraphQL scalar for ISO-8601 timestamps, backed by java.time.Instant. Round-trips "2026-07-30T18:00:00Z" ↔ Instant.

GraphQL scalar for ISO-8601 timestamps, backed by java.time.Instant.
Round-trips "2026-07-30T18:00:00Z" ↔ Instant.
sourceraw docstring

local-date-timeclj

GraphQL scalar for naive date-times (no zone), backed by java.time.LocalDateTime. Round-trips "2026-07-30T18:00:00" ↔ LocalDateTime.

GraphQL scalar for naive date-times (no zone), backed by
java.time.LocalDateTime. Round-trips "2026-07-30T18:00:00" ↔
LocalDateTime.
sourceraw docstring

uuidclj

GraphQL scalar for RFC 4122 UUIDs, backed by java.util.UUID.

GraphQL scalar for RFC 4122 UUIDs, backed by java.util.UUID.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close