Skip to content

Commit

Permalink
feat: added error field to operations
Browse files Browse the repository at this point in the history
  • Loading branch information
acaldas committed Sep 12, 2024
1 parent 191272e commit d3a7458
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 6 deletions.
2 changes: 1 addition & 1 deletion api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"body-parser": "^1.20.2",
"cookie-parser": "^1.4.6",
"cors": "^2.8.5",
"document-drive": "1.0.0-alpha.92",
"document-drive": "1.0.0-alpha.94",
"document-model": "^1.8.0",
"document-model-libs": "^1.84.0",
"dotenv": "^16.4.5",
Expand Down
11 changes: 6 additions & 5 deletions api/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions api/src/graphql/server/generated/drive/nexus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export interface NexusGenInputs {
}
InputOperationUpdate: { // input type
context?: NexusGenInputs['InputOperationContext'] | null; // InputOperationContext
error?: string | null; // String
hash: string; // String!
id?: string | null; // String
index: number; // Int!
Expand Down Expand Up @@ -286,6 +287,7 @@ export interface NexusGenObjects {
revision: number; // Int!
}
DefaultOperation: { // root type
error?: string | null; // String
hash: string; // String!
id?: string | null; // String
index: number; // Int!
Expand Down Expand Up @@ -453,6 +455,7 @@ export interface NexusGenObjects {
}
OperationUpdate: { // root type
context?: NexusGenRootTypes['OperationContext'] | null; // OperationContext
error?: string | null; // String
hash: string; // String!
id?: string | null; // String
index: number; // Int!
Expand Down Expand Up @@ -808,6 +811,7 @@ export interface NexusGenFieldTypes {
revision: number; // Int!
}
DefaultOperation: { // field return type
error: string | null; // String
hash: string; // String!
id: string | null; // String
index: number; // Int!
Expand Down Expand Up @@ -984,6 +988,7 @@ export interface NexusGenFieldTypes {
}
OperationUpdate: { // field return type
context: NexusGenRootTypes['OperationContext'] | null; // OperationContext
error: string | null; // String
hash: string; // String!
id: string | null; // String
index: number; // Int!
Expand Down Expand Up @@ -1201,6 +1206,7 @@ export interface NexusGenFieldTypes {
revision: number; // Int!
}
IOperation: { // field return type
error: string | null; // String
hash: string; // String!
id: string | null; // String
index: number; // Int!
Expand Down Expand Up @@ -1364,6 +1370,7 @@ export interface NexusGenFieldTypeNames {
revision: 'Int'
}
DefaultOperation: { // field return type name
error: 'String'
hash: 'String'
id: 'String'
index: 'Int'
Expand Down Expand Up @@ -1540,6 +1547,7 @@ export interface NexusGenFieldTypeNames {
}
OperationUpdate: { // field return type name
context: 'OperationContext'
error: 'String'
hash: 'String'
id: 'String'
index: 'Int'
Expand Down Expand Up @@ -1757,6 +1765,7 @@ export interface NexusGenFieldTypeNames {
revision: 'Int'
}
IOperation: { // field return type name
error: 'String'
hash: 'String'
id: 'String'
index: 'Int'
Expand Down
4 changes: 4 additions & 0 deletions api/src/graphql/server/generated/drive/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ type DefaultDocument implements IDocument {
}

type DefaultOperation implements IOperation {
error: String
hash: String!
id: String
index: Int!
Expand Down Expand Up @@ -319,6 +320,7 @@ interface IDocument {
}

interface IOperation {
error: String
hash: String!
id: String
index: Int!
Expand Down Expand Up @@ -358,6 +360,7 @@ input InputOperationSignerUser {

input InputOperationUpdate {
context: InputOperationContext
error: String
hash: String!
id: String
index: Int!
Expand Down Expand Up @@ -492,6 +495,7 @@ type OperationSignerUser {

type OperationUpdate {
context: OperationContext
error: String
hash: String!
id: String
index: Int!
Expand Down
5 changes: 5 additions & 0 deletions api/src/graphql/server/generated/index/nexus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export interface NexusGenObjects {
shortCode?: string | null; // String
}
DefaultOperation: { // root type
error?: string | null; // String
hash: string; // String!
id?: string | null; // String
index: number; // Int!
Expand Down Expand Up @@ -250,6 +251,7 @@ export interface NexusGenFieldTypes {
shortCode: string | null; // String
}
DefaultOperation: { // field return type
error: string | null; // String
hash: string; // String!
id: string | null; // String
index: number; // Int!
Expand Down Expand Up @@ -379,6 +381,7 @@ export interface NexusGenFieldTypes {
revision: number; // Int!
}
IOperation: { // field return type
error: string | null; // String
hash: string; // String!
id: string | null; // String
index: number; // Int!
Expand Down Expand Up @@ -423,6 +426,7 @@ export interface NexusGenFieldTypeNames {
shortCode: 'String'
}
DefaultOperation: { // field return type name
error: 'String'
hash: 'String'
id: 'String'
index: 'Int'
Expand Down Expand Up @@ -552,6 +556,7 @@ export interface NexusGenFieldTypeNames {
revision: 'Int'
}
IOperation: { // field return type name
error: 'String'
hash: 'String'
id: 'String'
index: 'Int'
Expand Down
2 changes: 2 additions & 0 deletions api/src/graphql/server/generated/index/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ type CoreUnit {
scalar Date

type DefaultOperation implements IOperation {
error: String
hash: String!
id: String
index: Int!
Expand Down Expand Up @@ -111,6 +112,7 @@ interface IDocument {
}

interface IOperation {
error: String
hash: String!
id: String
index: Int!
Expand Down
2 changes: 2 additions & 0 deletions api/src/modules/document-drive/drive-resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ export const OperationUpdate = objectType({
t.nonNull.string('input');
t.nonNull.string('hash');
t.nonNull.string('timestamp');
t.string('error');
t.field('context', { type: OperationContext });
}
});
Expand Down Expand Up @@ -156,6 +157,7 @@ export const InputOperationUpdate = inputObjectType({
t.nonNull.string('hash');
t.nonNull.string('timestamp');
t.string('id');
t.string('error');
t.field('context', { type: InputOperationContext });
}
});
Expand Down
1 change: 1 addition & 0 deletions api/src/modules/document/resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const operationModelInterface = interfaceType({
t.nonNull.string('hash');
t.string('id');
t.nonNull.string('inputText');
t.string('error');
},
resolveType: e => {
return 'DefaultOperation';
Expand Down

0 comments on commit d3a7458

Please sign in to comment.