entriesForParticipant
Query
All entries (runners) for a participant, ordered by scheduled race time,
most recent first. Each Runner exposes its parent race via Runner.race,
so callers can render a single round-trip form table.
entityType accepts HORSE / JOCKEY / TRAINER — the resolver routes to
the matching column on the entries table. Other types (OWNER) raise a
validation error (ownership isn’t a per-race relationship; use the
ownership-tracker surface instead).
Future-window mode (for “is this horse scheduled to race again soon?”):
set futureOnly: true to restrict to races scheduled at or after now,
ordered soonest-first, excluding finished races and inactive entries
(NON_RUNNER / WITHDRAWN / DISQUALIFIED). Add withinDays to cap the
window (e.g. withinDays: 7). With futureOnly false (the default) the
query is the full form history, newest first, unfiltered by status —
withinDays is ignored in that mode.
Status filtering (POD-539): pass excludeStatuses to drop entries in the
given states from either mode. For a horse’s career history the
recommended default is excludeStatuses: [NON_DECLARED] (a horse that was
never declared to run has no run to show); add WITHDRAWN and NON_RUNNER
to also hide those. Left empty (the default) the result is unfiltered by
status, so existing callers are unaffected.
Returns: [Runner!]!
Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
entityType | ParticipantEntityType! | — |
participantId | ID! | — |
limit | Int | — |
offset | Int | — |
futureOnly | Boolean | When true, restrict to races scheduled at or after now and order ascending (soonest first); also excludes finished races and NON_RUNNER / WITHDRAWN / DISQUALIFIED entries. Default false = full form history, newest first. |
withinDays | Int | Upper bound on the future window in days from now (e.g. 7). Only applies when futureOnly is true; ignored otherwise. Must be an integer 1–365. |
excludeStatuses | [RunnerStatus!] | Entry statuses to exclude from the result. For a horse’s career history pass [NON_DECLARED] (recommended default) so runs the horse was never declared for are hidden; add WITHDRAWN / NON_RUNNER to also hide those. Empty / omitted = no status filtering. |