Home · Apps · rl-main-infra · todo_api · todo_mobile
todo_mobile currently performs sync writes through GraphQL and expects Auth0-issued identity context to be accepted by backend auth middleware.
From app env (Env):
AUTH0_DOMAINAUTH0_CLIENT_IDAUTH0_REDIRECT_URIGRAPHQL_ENDPOINTidToken securely.The current GraphQL client uses
HttpLinkwithout an auth header injector. Backend integration is expected to add/standardize bearer token forwarding in a follow-up.
upsertTodomutation UpsertTodo($input: TodoInput!) {
upsertTodo(input: $input) {
id
version
updatedAt
}
}
$input is forwarded from queued SyncJob.payload and is expected to represent a full todo payload.
{
"id": "uuid",
"listId": "uuid",
"title": "string",
"description": "string",
"dueDate": "2026-03-06T12:00:00.000Z",
"labels": ["work", "urgent"],
"reminderAt": "2026-03-06T11:45:00.000Z",
"completed": false,
"updatedAt": "2026-03-06T10:00:00.000Z",
"deleted": false,
"version": 2,
"force": false
}
force is optionally set by client during clientWins conflict replay.CONFLICT.scalar DateTime
input TodoInput {
id: ID!
listId: ID!
title: String!
description: String
dueDate: DateTime
labels: [String!]
reminderAt: DateTime
completed: Boolean
updatedAt: DateTime!
deleted: Boolean
version: Int
force: Boolean
}
type Todo {
id: ID!
version: Int!
updatedAt: DateTime!
}
type Mutation {
upsertTodo(input: TodoInput!): Todo!
}
sequenceDiagram
participant App as todo_mobile
participant Hive as Hive syncQueue
participant API as GraphQL API
App->>Hive: enqueue(SyncJob)
App->>App: detect connectivity restored
App->>Hive: read queued jobs
loop each job
App->>API: mutation upsertTodo(input: payload)
alt success
App->>Hive: delete job
else conflict error contains "CONFLICT"
App->>App: apply conflict strategy
App->>API: retry with merged/forced payload
end
end