GraphQL POST endpoint. Defaults to DEFAULT_GRAPHQL_URL.
Optional headers, custom fetch, or clientLibrary override.
ProtectedclientProtectedendpointProtectedfetchProtectedheadersConvenience wrapper around TiltifyGraphQL.getFactDonations that walks every page and returns the full flat list of donation nodes. Suitable when you actually want every donation; otherwise prefer manual pagination.
Fact id.
Donations fetched per page. Defaults to 100.
Every donation node across all pages.
Fetch a cause and one of its fundraising events in a single request.
Mirrors the call the Tiltify site makes when rendering an FE landing page
(e.g. stjude.tiltify.com/game-warp-2026).
Cause + FE slug pair.
Both records (each may be null independently).
Fetch a cause's full profile by slug.
Cause slug (e.g. "stjude").
The full cause profile, or null if not found.
Top user + team leaderboards for a cause (250 entries each).
Cause slug.
Leaderboards, or null if the cause does not exist.
Active site-wide missions (the cards on the marketing homepage).
The list of currently active missions.
Resolve a tiltify.com/<vanity>/<slug> URL pair to its fact id, template,
and usage type. Use this when you only have a slug and need to look up the
underlying public id (e.g. for the WebSocket or REST APIs).
vanity should be the path segment without any leading @ or +.
slug is optional — leave it out for a top-level vanity URL.
Tiltify does not resolve an unknown pair to null — it replies HTTP
200 with {"errors":[{"message":"404"}]}. That not-found case is
caught here and normalized to null so the documented contract holds.
Any other failure (outage, malformed response, rate limit) still
throws, so callers can tell "no such fact" apart from "upstream is
broken."
The vanity and optional slug portions of the URL.
The resolved fact pointer, or null if no match.
Cursor-paginated donations for a fact, ordered ascending by id. Returns
the raw GraphQL connection so callers can drive their own pagination
using pageInfo.endCursor.
Fact id, page size, and optional cursor.
The full donation connection, or null if the fact does not exist.
Fitness (distance/time) leaderboards for a fact, user + team flavors.
Fact id + optional limit (default 10).
Four fitness leaderboards, or null if the fact does not exist.
Donor / user / team leaderboards for any fact (campaign, FE, cause).
Fact id + optional limit (default 10).
Three leaderboards, or null if the fact does not exist.
Milestones for a fact (fundraising event, campaign, or cause).
Wraps the same get_default_template_fact GraphQL operation the
tiltify.com FE/campaign landing pages send. That operation returns
every panel the marketing template renders (milestones, polls,
rewards, sponsors, template config, impact points, fitness data, …)
because Tiltify's GraphQL gateway enforces a server-side query-text
whitelist — we cannot ship a slimmed-down variant. The wrapper
discards everything except the milestones array so callers who only
need milestone thresholds don't have to project the payload
themselves.
If you need the full payload (polls, rewards, template panels,
impact points, …) send GET_DEFAULT_TEMPLATE_FACT_QUERY yourself
via TiltifyGraphQL.query.
Returns null when the fact does not exist, or an empty array when
the fact exists but has no milestones configured. This mirrors the
null vs [] split every other fact-scoped helper uses. As with
TiltifyGraphQL.getFactByVanityAndSlug, an unknown id comes
back from Tiltify as an HTTP 200 carrying a 404 GraphQL error
rather than a null resolve, so that case is normalized to null
here; every other failure still throws.
Fact id. For a fundraising event, resolve via
TiltifyGraphQL.getFactByVanityAndSlug (the id returned by
factVanitySlug(vanity, slug) — not the FE's publicId).
The ordered milestones list, or null if the fact is
missing.
const client = new TiltifyGraphQL();
// 1. Resolve the FE fact id from its landing-page URL.
const fact = await client.getFactByVanityAndSlug({
vanity: "stjude",
slug: "relay-for-st-jude-2026",
});
// 2. Fetch the milestones for that fact.
const milestones = await client.getFactMilestones(fact!.id);
milestones?.filter((m) => m.active); // "next unhit" milestones
The single largest donation on a fact.
Fact id.
The top donation, or null if none exist.
All six leaderboards (donor / user / team / weekly + two fitness) for a fundraising event, 250 entries each.
Fundraising event id (the value returned as
fundraisingEvent.id on TiltifyGraphQL.getCauseAndFundraisingEventBySlug
— Tiltify's FundraisingEvent type used to expose this as publicId
but was renamed to id in the 2026-08 schema pass).
The full leaderboard bundle, or null if not found.
Most recently earned badges, site-wide.
Latest badges with the badge + user that earned each one.
All badge groups, with earned flagged for the given user.
Tiltify user id.
Every badge group with per-badge earned/unearned status.
Fetch a full user profile by slug. Returns null when the user does not
exist.
Defaults the return type to the TiltifyUser GraphQL profile
shape — byte-compatible with the legacy
@playlive/tiltify-tools/user-search TiltifyUser export, so consumers
migrating off that package can drop the import specifier in place. Pass
a custom TUser only if you've shaped a richer/narrower selection set
by overriding the GraphQL operation upstream.
Tiltify user slug (e.g. "fauxretro").
The fully hydrated user, or null if not found.
// Default — typed against the canonical TiltifyUser profile shape.
const user = await gql.getUserBySlug("fauxretro");
user?.publishedCampaigns.edges[0]?.node.publicId;
// Narrowed — swap in your own slim type when you've overridden the query.
const slim = await gql.getUserBySlug<{ id: string; slug: string }>("fauxretro");
Low-level helper: POSTs a GraphQL request and returns the parsed data.
Throws on non-2xx HTTP responses or when the body contains errors.
Every failure mode throws a TiltifyGraphQLError, which carries
the raw errors[], the HTTP status (when the failure was HTTP-level),
and an isNotFound flag. That flag matters because Tiltify signals a
missing resource as HTTP 200 with {"errors":[{"message":"404"}]}
rather than a 404 status, so callers cannot classify it from the
response status alone.
GraphQL operation name (e.g. get_user_by_slug).
The full GraphQL query string.
Optionalvariables: TVars
Optional variables map for the operation.
The unwrapped data field from the GraphQL response.
Thin wrapper around the public Tiltify GraphQL endpoint (
https://api.tiltify.com/). Every method returns the unwrappeddatafor the corresponding operation and throws on HTTP errors or GraphQLerrors.The endpoint accepts unauthenticated requests for every operation defined here. If you need authenticated queries (e.g.
get_authed_userondashboardapi.tiltify.com) pass anAuthorizationheader viaoptions.headersand overrideendpointin the constructor.Example
See
https://api.tiltify.com — the public GraphQL endpoint.