RootQueryType Object
Pie GraphQL API root query.
Authentication methods:
- Browser session cookie: used automatically when GraphiQL or the app is opened by a logged-in user.
- Organization Access Token: an admin of an organization on the Enterprise plan creates and revokes tokens in that organization's settings, on the Integration tab. Send
Authorization: Bearer pie_pat_xxx. The token belongs to the organization, not to the admin who created it: it keeps working when that admin loses admin rights or closes their account, and stops only when it is revoked or expires, or when the organization is deleted, leaves the Enterprise plan or becomes a trial. It sees that one organization only: every task in every project, every member's project, task and non-project time, and billing and cost rates, but no one's personal workspace or "my work". Because it is not a person,meis refused; useorganizationsto find the token's organization, andrecipesto find its recipes. The admin chooses the token's access when creating it. A Read token is refused every change (api_token_read_only). A Read + write token can create and change projects (a new project must name at least one admin among itsassignments, byuserIdoruserEmail, an existing member of the organization:project_admin_requiredotherwise; the admin role is allowed for a token only at project creation), slices of a new project, boxes, tasks, assignments, roles, workspace members, time, comments and tags, but only the changes listed in the developer guide; any other change is refused (api_token_not_allowed). Everything a change names must be in the token's organization, and a person can be named by id or by email address (userEmail,ownerEmail), matched to an existing member of the organization (person_not_foundotherwise; nobody is ever invited). Changes made with a token are shown as "API User #", the token's own short code, never under a person's name: in task history, comments, alerts and emails. The API User is not a member: it takes no seat, receives no email and is never added to a team. Time is always logged on a named person's timesheet; only the organization's existing time tags may be used (unknown_time_tagotherwise). Each token has its own rate limits per 10 minutes: 50 projects, 500 single assignments and 50 whole-slice assignments. - MCP connection: a bearer token issued after the user approves an AI assistant. It is confined to the organization chosen at consent and to its scope (
queries, orqueries mutations).
Fields
#
assignment
Fetch a single assignment record by id. An assignment is the link between a
user and a task or a project in Pie, carrying the user's role on the
target, optional planned hours, billing rate overrides, work effort, and a
pending flag indicating the assignment still awaits approval by a project
or workspace admin (see approveAssignment and denyAssignment).
Use this query when you already know the assignment id; to list
assignments for a project's tasks, request the assignments field on each
Todo returned by projectTodos instead.
Returns null when the id does not exist or the caller may not manage
the assignment: access requires being a workspace admin, a project
admin (role "admin" or "admin+autoassign"), or, for todo
assignments, a user assigned to that todo. Stack-level
("stack_admin") assignments are not retrievable through this query.
me
Returns the profile of the currently authenticated user. This is the recommended first call for any AI assistant or API session: it identifies who is logged in and returns the user's id, firstName, lastName, email, and linked organizationUsers and workspaceUsers. Use organizationUsers and workspaceUsers to navigate the user's available organizations and workspaces before making further queries.
ompTodos
Returns the tasks (Todos) assigned to the current user across all their
workspaces — the data that powers Pie's On My Plate (OMP) page. The
result combines two flavors of tasks the user is responsible for:
standalone OMP tasks (todos with no project slice — these live in
the user's personal workspace, the only place where new standalone
todos can be created, plus any slice-less todos assigned to the
user) and project tasks (todos belonging to a slice of any
currently-open project in a workspace the user can access). The
filters.name argument
selects a date window and is matched case-sensitively — accepted
values are "Late", "Next 7 days", "Weeks", "Custom days:", and
"Personal tasks with no dates". For "Weeks" and "Custom days:" also
supply filters.start and filters.due.
"Today" is the server's current UTC date. "Late" returns incomplete
tasks (progress below 100) whose due date is before today, excluding
tasks snoozed to today or later. The date windows match a task whose
date span overlaps the window: the span runs from its start date to
its due date, a task with only one of the two dates matches when that
date falls inside the window, and a snooze date replaces the start
date and extends the due date. "Next 7 days" covers today through the
sixth day after it; "Weeks" and "Custom days:" cover filters.start
through filters.due, both inclusive. "Personal tasks with no dates"
returns standalone tasks without a due date. Only "Late" excludes
completed tasks; filter the other windows on progress if you only
want open work.
Only "Late" is paginated: 10 tasks per page, most recently due first,
with total counting every late task and pages past the end
returning an empty list. Every other filter returns all matching
tasks on every page, with total equal to that count, so request
page 1 only. Use this query for "my work" across the whole
account; use projectTodos when you need every task of a single
project (which has no userId filter).
organization
Fetch a single organization by id. In Pie, an organization is the top level of the hierarchy, containing one or more workspaces; workspaces in turn contain projects and recipes. Users become members of an organization by being added to one of its workspaces; organization admins are the only role assigned directly at the organization level. Use this query when you already know the organization id; use the organizations query to retrieve all organizations the current user belongs to.
The organization is returned when the caller is one of its admins or holds a membership in any of its workspaces; any other id — including a nonexistent one — fails with an error rather than returning null.
organizationActivityTimeItems
Returns the calling user's Non-Project Activity Timesheet rows in
the given organization: TimeItems whose organizationId matches
the argument. Project- and Todo-backed rows carry a null
organizationId, so they are never returned here — use
timeItems for those. A Non-Project Activity row belongs to
exactly one organization, and a user can belong to several, which
is why organizationId is required.
Only rows owned by the calling user are returned; another user's
activity rows cannot be read through this query. An Organization
Access Token is the exception: it receives every member's rows in
its organization. Rows soft-deleted with deleteTimeItem are still
included with their deletedAt set — filter on that field
client-side. Pie's OMP Timesheet view
uses this query to populate the Non-Project Activity section.
organizations
Returns all organizations the current user belongs to. In Pie, an organization is the top level of the hierarchy and contains one or more workspaces; workspaces in turn contain projects and recipes. A user becomes a member of an organization either by being added to one of its workspaces or by being assigned directly as an organization admin. Use this query as the starting point for navigating a user's available organizations; use the organization query when you already know the specific id.
post
Fetch a single post by id. In Pie, a post is a message attached to a project, a project slice, a task, a recipe, a recipe slice, or a recipe task, and other team members can reply to it. Posts have a type of "message", "issue", "idea", or "reply"; issues additionally carry a secondaryType of "Issue" or "Risk".
Access: the post is returned to its author, to its current owner, to
callers with update permission on its Project (Project Admin, Stack
Admin, or Workspace Admin), or — for Recipe-side posts — to callers
with view access to the Recipe. Posts attached to a slice or task are
readable through this query only by their author or owner. Other
callers get a not_allowed error; an unknown id returns not_found.
id is required at runtime despite the nullable schema typing.
Use this query when you already know the post id. To retrieve posts attached to a project or todo, request the posts field on those objects directly — slice types do not expose a posts field, so to read posts on a slice you must list the slice's todos and read posts from there.
project
Fetch a single project by id, or by sharing token if the project has been shared externally. In Pie, a project is a container of tasks. Tasks may be organized into a project without slices (same as one slice), with slices (the stages of a project), and optionally into boxes within a slice; both layers are optional, so a project can be a flat task list or a slices-with-boxes hierarchy. A project may also be configured as a Kanban-like "Board" containing column boxes, where tasks can be added to each column box. A project lives inside a workspace and may belong to a stack (portfolio view). Pass the id argument for authenticated access. Public sharing uses the separate /sharing/api endpoint and its query-only public schema; sharing tokens are not accepted here. Use the projects query for a list of viewable projects.
projectListView
Returns the list of Projects that current User is assigned to. It is the
Project List page exactly as the Pie UI presents it: by
default the In Progress tab, grouped by stack, and naturally sorted
by title. Use this — not projects — to answer "what are my projects?",
"my current/active/assigned projects", or to reproduce the project list a
user sees on screen.
Tab (tab, default IN_PROGRESS):
IN_PROGRESS— standalone projects whoseclosedStatusis"open", plus open stacks (and all of their projects).ON_HOLD— standalone projects whoseclosedStatusis"hold". No stacks appear on this tab.DONE_ARCHIVED— standalone projects whoseclosedStatusis"closed", plus closed stacks (and all of their projects).ALL— every project and stack regardless of status. This is what the UI requests so it can switch tabs without re-fetching.
Rules encoded here so callers never re-derive them:
- Stacks are filtered by the stack's own open/closed flag, independently
of the
closedStatusof the projects inside them. Once a stack is visible, ALL of its projects are returned (ordered byposition), regardless of each project's status. - 100%-complete projects are kept on whichever tab their
closedStatusputs them — completeness is never used as a filter. - Soft-deleted projects are never returned unless a platform admin passes
includeDeleted: true(ignored for non-admins). - Visibility is identical to the
projectsquery (same Pie access control); no new data is exposed. - With no
workspaceId/organizationIdthe result spans every workspace the user can see; pass either argument to scope it. groupByStack: falseflattens everything intostandaloneProjects(naturally sorted) and returns nostacks.
The list is always complete — projectListView is not paginated;
totalCount reports the number of projects returned. appliedFilters
describes exactly which filters were applied so an AI assistant can state scope
truthfully.
When the customer asks what projects they are assigned to, or
similar (for example "what am I working on", "show my current
projects"), request workspace { name organization { name } }
on standaloneProjects and on the projects inside stacks,
then render the result as text:
- Group by organization and workspace. Heading:
{workspace.organization.name} — {workspace.name} workspace(for example "Axis (Enterprise) — Operations workspace"). Sort headings alphabetically by full heading text. - Under each heading, interleave standalone projects and
stacks into one list sorted alphabetically by title. Label a
stack
{stack.title} (Stack)and indent its member projects beneath it in API order. - Omit
id,progress,currentUserProjectRole, andclosedStatusunless the customer asks for them.
projectTodos
Returns the tasks (Todos) in a single project that the calling user
is permitted to view. Visibility is based on the user's assignment
to the project: a member assigned with any role other than
"only_my_work" receives every task in the project; a member with the
"only_my_work" role receives only the tasks directly assigned to
them; a user with no assignment to the project — including workspace
admins — receives an empty list rather than an error. An
Organization Access Token receives every task in the project.
Results are ordered by slice position, then box position, then task
position.
Soft-deleted tasks are excluded; completed tasks are included. The
Todo progress field (integer 0–100, nullable) is the only
completion signal — progress >= 100 means done, nil means not
started. Filter client-side on progress if you only want open
work. There is no separate closed boolean on Todo.
Subtasks are not nested in the response: if a Todo references a parent, both appear as separate top-level items. Use this query for the task list of one project; use projectsTodos when you need tasks across multiple projects filtered by due date.
projectsTodos
Returns todos across the specified projects that are either due on
or before the given dueDate, or whose startDate is on or before
the dueDate. A todo is included when at least one of its dates is
set and falls on or before the cutoff; todos with neither date set,
or whose set dates all fall after the cutoff, are excluded.
Completed todos are included in the result; if the caller wants
only open work, they must filter client-side on the Todo's
progress field (progress >= 100 = done).
Access control is applied per project: a project from projectIds
contributes todos only when the calling user is a member of its
workspace and additionally is a workspace admin, holds a project
role of admin or admin+autoassign, or is assigned to the
project's parent Stack. Projects that fail this check are silently
skipped rather than raising an error. Pie's OMP Tasks "Teams
Plate" view uses this query for cross-project deadline planning.
Use projectTodos instead when you need the full task list for a single project without date filtering.
searchPeople
Search for people the calling user can see, returning a list of matching Users. Powers Pie's people-picker UI for assigning Todos, sharing Projects and Recipes, and inviting collaborators.
The search argument is matched against the user's firstName,
lastName, primary email, secondary emails (the UserEmail
table), and the concatenation "firstName lastName email". Matching
is prefix on the individual fields and substring on the
concatenated form (the latter only when query length > 1). All
comparisons are lowercased and trimmed.
By default the search pool is the caller's organization network:
the members of every workspace belonging to an organization the
caller is in, plus those organizations' organization-level admins.
Workspaces that belong to no organization are not searched.
workspaceId does not narrow the results — it ranks that
workspace's members first and returns each member's
workspace-preferred email address (the id must be a workspace the
caller can view, otherwise it is ignored). organizationId
narrows the pool to members of that organization's workspaces that
contain a project where the caller holds the "admin" or
"admin+autoassign" role. existingIds excludes users whose ids
are in the list — used by the UI to hide people already added to
the current selection.
The prefix/substring search returns at most 10 users. In
addition, when search exactly equals one of an account's email
addresses (primary or secondary), that single user is also
returned — this exact-email match is global, not limited to the
caller's network, and ignores existingIds.
Returned Users include isInvite: true (people invited but not
yet activated) and accountDeactivated: true (deactivated
accounts) by default; clients must filter if they want only
active members.
sliceTodos
Returns the tasks (Todos) in the given Project-Slices that the calling user is permitted to view. Visibility follows the parent Project's access rule: the user must be a workspace admin or viewer, or a workspace member with an assignment to the Project (or a stack_admin role on its parent Stack). Slice ids belonging to Projects the user cannot view — or to deleted Slices or Projects — are silently omitted from the result rather than raising an error.
A user holding the "only_my_work" role on a Project receives only
the tasks assigned to them, plus parent tasks of their assigned
subtasks — the same scope they see on the Project board. An
Organization Access Token receives every task in the Slices.
Soft-deleted tasks are excluded; completed tasks are included
(filter client-side on progress if you only want open work).
Slice ids from different Projects may be mixed in a single call;
the response is a flat [Todo] list across Projects. Group results
after the fact via each Todo's sliceId (or slice { projectId }
for the parent Project). No ordering is guaranteed — sort
client-side on the position field if a stable order is needed.
Use this query for the task lists of specific Slices; use projectTodos for the full task list of a Project. This query is for Project-Slices only; Recipe-Slice contents are retrieved through the Recipe type.
stack
Returns a single Stack by id, if the calling user is permitted to view it. A Stack is a portfolio grouping of multiple Projects (Stacks apply to Projects only, not Recipes). When all child Projects share the same SlicesList, the Stack inherits and visually displays that Slice nomenclature on its own pie; when child Projects use different Slice sets, the Stack pie displays without Slices. The Stack also aggregates and visually represents the combined progress of all its child Projects.
The id argument is required. When the calling user is not
permitted to view the requested Stack, the query returns a
"not_allowed" error; an unknown id returns a "not_found" error.
Use this query to fetch the details of one Stack for a portfolio
view, or as the entry point before drilling into the Stack's
Projects via the stackProjects query.
stackProjects
Returns the list of Projects belonging to a Stack. A Stack is a
portfolio grouping of multiple Projects (Stacks apply to Projects
only, not Recipes). Use this query to drill into a Stack's
contents — for example, to render a portfolio view's Project list
or to compute aggregate metrics across the Stack's Projects.
Results are filtered by access: workspace admins (and organization
admins) receive every Project in the Stack; other callers receive
the Projects they are assigned to, or all of them when they hold a
Stack assignment (stack_admin). Soft-deleted Projects are
excluded.
The id argument (the Stack id) is required. When the calling
user is not permitted to view the parent Stack, the query returns
an error.
stacks
Returns the list of all Stacks the calling user is permitted to view. A Stack is a portfolio grouping of multiple Projects (Stacks apply to Projects only, not Recipes); when all child Projects share the same SlicesList, the Stack inherits that Slice nomenclature, and the Stack visually aggregates the combined progress of its child Projects.
Use this query as the entry point for portfolio-level navigation,
then drill into a single Stack via the stack query, or fetch a
Stack's Projects via stackProjects. No arguments are accepted;
results are scoped by Pie's access control. There is no workspace
or organization filter on this query; if a caller needs Stacks for
a specific scope, they must filter the response client-side using
the workspaceId field on each returned Stack.
timeItems
Returns TimeItem records, filtered by date, by Project, or by Todo. A TimeItem represents a line on the user's OMP Timesheet page, scoped to a specific week and target. The target can be a Project (Project-level time), a Todo within a Project (Task-level time), or a Non-Project Activity (company meetings, training, days off, administrative work).
Non-Project Activity TimeItems are represented as TimeItems with
projectId and todoId both null and the organizationId field
set — there is no separate kind enum. Each TimeItem can carry one
or more Tags (organization-managed labels such as "Billable" or
"Training") used for reporting.
Argument behavior is exclusive — arguments do not combine. The
resolver matches one argument at a time, with precedence
projectId, then todoId, then dates:
dates(a list of specific dates) — returns the calling user's own TimeItems matching the exact dates. To request a range, callers must enumerate every date in the range; per-week aggregation is not applied at the API layer.projectId— returns TimeItems of any user against that Project or its Todos, provided the caller is permitted to view the Project (otherwise an empty list; an unknownprojectIdalso yields an empty list). Only rows with at least one actual (non-planned) time entry dated today or earlier are included.todoId— returns TimeItems of any user for that specific Todo, filtered per item by the caller's permissions.
At least one of dates, projectId, or todoId must be
supplied; passing no arguments returns the error "Must provide at
least one of: dates, project_id, todo_id".
TimeItems on soft-deleted Projects or Todos are excluded. A row's
own soft delete is NOT filtered, however: rows removed with
deleteTimeItem are still returned with their deletedAt set,
so filter on that field client-side.
See also organizationActivityTimeItems (organization scope) and
timeEntriesReport (Project scope, aggregated). Time tracking is
a premium feature available on the Enterprise plan; queries
against organizations without the feature may return empty
results.
todo
Returns a single Todo by id, if the calling user is permitted to view it. A Todo is a task in Pie's model — the unit of work that can be assigned to one or more users, placed inside a Box on a Project board (or directly at the Project level when the Project has no Slices), associated with a parent Todo as a subtask, given start and due dates, given estimated and planned work effort, tagged with one or more ColorTags, and tracked for time.
Use this query when the caller has a Todo id (from a list query like projectTodos, sliceTodos, ompTodos, or projectsTodos) and needs the full detail of that one Todo. When the calling user is not permitted to view the Todo, or no Todo has the given id, the query returns null rather than an error.
See projectTodos for the full task list of a Project, sliceTodos for the task list of one or more Project-Slices, and recipeTodo for the equivalent query on a Recipe template.
user
Look up a Pie user by email address. The required email argument
is the email to search for; the response is a UserInfo record if a
Pie user with that email exists, or null if no Pie user is found.
Looking up the caller's own email also returns null — the query
exists to find other users.
The primary use case is the "add person" flow that appears across Pie's UI in multiple surfaces (add to workspace, add to project, add to project task, add to personal task, add to account People page, add Recipe Admin, add Organization Admin). When an admin enters an email, the UI calls this query to determine whether the email already corresponds to a Pie user. Three outcomes drive the UI: an in-network match (the user is already in the caller's account), an out-of-network match (the user has a Pie account but is not in the caller's account, displayed in the UI with an "(external)" label), or no match (which triggers a new-user invitation flow where the admin then supplies a first and last name).
The lookup matches against the primary email column only —
secondary/preferred emails are not searched through this
endpoint. The match is case-insensitive.
The returned UserInfo does not include a field that explicitly distinguishes in-network from out-of-network. The client derives this state by cross-referencing the returned user id against the caller's known workspace/organization members.
No rate limiting is currently applied to this endpoint.
This query is distinct from userInfo(id: Int!), which looks up
the same UserInfo shape by user id rather than email.
userInfo
Look up a single user by id, if the current user is allowed to see them. Returns a UserInfo record (a safe subset of user fields).
Visible users are the caller themselves and anyone sharing a workspace or an organization with the caller, where belonging to an organization means being a member of any of its workspaces or holding an organization-level user record. Out-of-network and nonexistent ids both return null rather than an error. Deactivated and invite-pending users inside the caller's network are returned.
This query is the id-based counterpart to user(email: Email!).
Use userInfo when the caller already has a user id (typically
from a list query like searchPeople, or from an existing
relationship such as a Todo's assignee, a Project's member list,
or a Workspace's user list); use user when only an email is
known — email lookup deliberately remains global, since knowing an
exact email address acts as a capability in Pie's invite flows.
Both queries return the same UserInfo shape. UserInfo is distinct
from the User type (returned by searchPeople and users):
UserInfo is a safer subset omitting workspaceUsers,
assignments, and historyLines, and it adds two scoped count
fields — assignedTodosCount(organizationId) and
assignedIssuesCount(organizationId) — that take an organization
filter.
users
Returns all Users in the specified Organization. The required
organizationId argument is the Organization id; results are
scoped to that one Organization.
Access rule: the caller's permission to view the organization is
checked via Pie's standard policy — view is allowed if the caller
is an admin in the organization or has any workspace membership
in one of the organization's workspaces. If the caller fails this
check (including when the organizationId is for an organization
the caller doesn't belong to), the query returns an empty list,
not an error. If the caller passes the check, every user holding a
membership in any of the organization's workspaces is returned,
with no further per-user filtering. Organization-level admins who
have no membership in any of the organization's workspaces are not
included.
The response includes deactivated users
(accountDeactivated: true) and pending-invite users
(isInvite: true) by default. Clients that want only active
members must filter client-side.
The return type is [User] — the same User type returned by
searchPeople, with the same fields populated. Use
user(email: Email!) or userInfo(id: Int!) when only an email
or id is known for an individual user.
workspace
Returns a single Workspace by id, if the calling user is permitted to view it. A Workspace sits between Organization and Projects/Recipes in Pie's hierarchy: an Organization contains one or more Workspaces, and each Workspace contains its own Projects, Recipes, Stacks, SlicesLists, and members. Workspaces are typically used to separate teams, departments, or client-facing work within a single Organization.
The Workspace is returned when the caller has a membership
(WorkspaceUser record) in it or is an admin of its Organization;
any other id — including a nonexistent one — returns null rather
than an error.
Use this query when the caller has a Workspace id and needs the
Workspace's detail (name, members, permissions, etc.). See
workspaces on the Organization type for listing all Workspaces
in an Organization, and the various workspaceId arguments on
queries like projects, recipes, stacks, and slicesLists
for filtering content to a specific Workspace.
RootMutationType
RootSubscriptionType
