Skip to content

Commit

Permalink
feat: added mutations and queries for document drive push and pull tr…
Browse files Browse the repository at this point in the history
…ansmitter
  • Loading branch information
froid1911 committed Jan 22, 2024
1 parent 8bb3255 commit 1b05ed8
Show file tree
Hide file tree
Showing 10 changed files with 288 additions and 179 deletions.
19 changes: 9 additions & 10 deletions api/src/generated/nexus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export interface NexusGenObjects {
driveId: string; // String!
revision: number; // Int!
scope: string; // String!
status: string; // String!
status: NexusGenEnums['UpdateStatus']; // UpdateStatus!
}
Mutation: {};
Node: { // root type
Expand Down Expand Up @@ -231,9 +231,10 @@ export interface NexusGenFieldTypes {
driveId: string; // String!
revision: number; // Int!
scope: string; // String!
status: string; // String!
status: NexusGenEnums['UpdateStatus']; // UpdateStatus!
}
Mutation: { // field return type
acknowledge: boolean | null; // Boolean
addDrive: NexusGenRootTypes['AddDriveResponse'] | null; // AddDriveResponse
createChallenge: NexusGenRootTypes['Challenge'] | null; // Challenge
createSession: NexusGenRootTypes['SessionOutput'] | null; // SessionOutput
Expand All @@ -257,7 +258,6 @@ export interface NexusGenFieldTypes {
stateHash: string; // String!
}
Query: { // field return type
acknowledge: boolean | null; // Boolean
coreUnit: NexusGenRootTypes['CoreUnit'] | null; // CoreUnit
coreUnits: Array<NexusGenRootTypes['CoreUnit'] | null> | null; // [CoreUnit]
countUsers: NexusGenRootTypes['Counter'] | null; // Counter
Expand Down Expand Up @@ -337,9 +337,10 @@ export interface NexusGenFieldTypeNames {
driveId: 'String'
revision: 'Int'
scope: 'String'
status: 'String'
status: 'UpdateStatus'
}
Mutation: { // field return type name
acknowledge: 'Boolean'
addDrive: 'AddDriveResponse'
createChallenge: 'Challenge'
createSession: 'SessionOutput'
Expand All @@ -363,7 +364,6 @@ export interface NexusGenFieldTypeNames {
stateHash: 'String'
}
Query: { // field return type name
acknowledge: 'Boolean'
coreUnit: 'CoreUnit'
coreUnits: 'CoreUnit'
countUsers: 'Counter'
Expand Down Expand Up @@ -404,6 +404,10 @@ export interface NexusGenFieldTypeNames {

export interface NexusGenArgTypes {
Mutation: {
acknowledge: { // args
listenerId?: string | null; // ID
revisions?: Array<NexusGenInputs['ListenerRevisionInput'] | null> | null; // [ListenerRevisionInput]
}
addDrive: { // args
global: NexusGenInputs['DocumentDriveStateInput']; // DocumentDriveStateInput!
local: NexusGenInputs['DocumentDriveLocalStateInput']; // DocumentDriveLocalStateInput!
Expand All @@ -429,10 +433,6 @@ export interface NexusGenArgTypes {
}
}
Query: {
acknowledge: { // args
listenerId?: string | null; // ID
revisions?: Array<NexusGenInputs['ListenerRevisionInput'] | null> | null; // [ListenerRevisionInput]
}
coreUnit: { // args
id?: string | null; // String
}
Expand All @@ -444,7 +444,6 @@ export interface NexusGenArgTypes {
}
strands: { // args
listenerId?: string | null; // ID
revisions?: Array<NexusGenInputs['ListenerRevisionInput'] | null> | null; // [ListenerRevisionInput]
}
strandsSince: { // args
listenerId?: string | null; // ID
Expand Down
6 changes: 3 additions & 3 deletions api/src/generated/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ type ListenerRevision {
driveId: String!
revision: Int!
scope: String!
status: String!
status: UpdateStatus!
}

input ListenerRevisionInput {
Expand All @@ -93,6 +93,7 @@ input ListenerRevisionInput {
}

type Mutation {
acknowledge(listenerId: ID, revisions: [ListenerRevisionInput]): Boolean
addDrive(global: DocumentDriveStateInput!, local: DocumentDriveLocalStateInput!): AddDriveResponse
createChallenge(address: String!): Challenge
createSession(session: SessionInput!): SessionOutput
Expand All @@ -119,15 +120,14 @@ type OperationUpdate {
}

type Query {
acknowledge(listenerId: ID, revisions: [ListenerRevisionInput]): Boolean
coreUnit(id: String): CoreUnit
coreUnits: [CoreUnit]
countUsers(message: String!): Counter
drive(id: String!): DocumentDriveState
drives: [String]
me: User
sessions: [Session]
strands(listenerId: ID, revisions: [ListenerRevisionInput]): [StrandUpdate]
strands(listenerId: ID): [StrandUpdate]
strandsSince(listenerId: ID, since: Date): [StrandUpdate]
}

Expand Down
Loading

0 comments on commit 1b05ed8

Please sign in to comment.