Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.

Commit a99a718

Browse files
committed
fix: update snapshot with lastupdatedat
1 parent d8a7b74 commit a99a718

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

packages/graphback-datasync/src/DataSyncPlugin.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export class DataSyncPlugin extends GraphbackPlugin {
179179
DeltaOTC.addFields({ [field.name]: field.type.toString() })
180180
}
181181

182-
modelTC.addFields({
182+
DeltaOTC.addFields({
183183
[DataSyncFieldNames.lastUpdatedAt]: {
184184
type: TimestampSTC.getType(),
185185
description: "@index(name: 'Datasync_lastUpdatedAt')"
@@ -190,10 +190,6 @@ export class DataSyncPlugin extends GraphbackPlugin {
190190
[DataSyncFieldNames.deleted]: GraphQLBoolean
191191
})
192192

193-
DeltaOTC.addFields({
194-
[DataSyncFieldNames.deleted]: GraphQLBoolean
195-
})
196-
197193
// Create and Add Delta List type to schema
198194
const DeltaListOTC = schemaComposer.createObjectTC({
199195
name: getDeltaListType(modelName),

packages/graphback-datasync/tests/__snapshots__/DataSyncPlugin.test.ts.snap

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ type CommentDelta {
2222
title: String
2323
description: String
2424
noteId: ID
25+
26+
\\"\\"\\"@index(name: 'Datasync_lastUpdatedAt')\\"\\"\\"
27+
_lastUpdatedAt: GraphbackTimestamp
2528
_deleted: Boolean
2629
}
2730
@@ -134,6 +137,9 @@ type NoteDelta {
134137
title: String
135138
description: String
136139
mainCommentId: ID
140+
141+
\\"\\"\\"@index(name: 'Datasync_lastUpdatedAt')\\"\\"\\"
142+
_lastUpdatedAt: GraphbackTimestamp
137143
_deleted: Boolean
138144
}
139145
@@ -241,6 +247,9 @@ type CommentDelta {
241247
title: String
242248
description: String
243249
_version: Int!
250+
251+
\\"\\"\\"@index(name: 'Datasync_lastUpdatedAt')\\"\\"\\"
252+
_lastUpdatedAt: GraphbackTimestamp
244253
_deleted: Boolean
245254
}
246255
@@ -371,6 +380,9 @@ type CommentDelta {
371380
id: ID!
372381
title: String
373382
description: String
383+
384+
\\"\\"\\"@index(name: 'Datasync_lastUpdatedAt')\\"\\"\\"
385+
_lastUpdatedAt: GraphbackTimestamp
374386
_deleted: Boolean
375387
}
376388

0 commit comments

Comments
 (0)