-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsyncforge-sync.graphql
More file actions
58 lines (49 loc) · 1.08 KB
/
Copy pathsyncforge-sync.graphql
File metadata and controls
58 lines (49 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# SyncForge GraphQL sync contract
#
# Same semantics as docs/REST_API.md — dedicated push/pull channel, not per-entity CRUD.
# Client: :syncforge-transport-graphql (GraphQlSyncTransport)
# Ktor resolver: graphqlRoutes(store) in dev.syncforge.server
scalar Long
enum ChangeType {
CREATE
UPDATE
DELETE
}
input OutboxEntryInput {
id: Long!
entityType: String!
entityId: String!
changeType: ChangeType!
payloadJson: String
localVersion: Long!
createdAtMillis: Long!
}
type PushRejection {
outboxId: Long!
code: String!
message: String!
}
type PushPayload {
acknowledgedIds: [Long!]!
rejected: [PushRejection!]!
}
type RemoteDelta {
entityType: String!
entityId: String!
payloadJson: String
serverVersion: Long!
updatedAtMillis: Long!
isDeleted: Boolean!
}
type PullPayload {
deltas: [RemoteDelta!]!
serverTimestampMillis: Long!
hasMore: Boolean!
nextPageCursor: String
}
type Query {
syncPull(since: Long!, types: [String!]!, limit: Int, cursor: String): PullPayload!
}
type Mutation {
syncPush(entries: [OutboxEntryInput!]!): PushPayload!
}