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

Commit

Permalink
fix: update snapshot with lastupdatedat
Browse files Browse the repository at this point in the history
  • Loading branch information
wtrocki committed Oct 8, 2020
1 parent d8a7b74 commit a99a718
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
6 changes: 1 addition & 5 deletions packages/graphback-datasync/src/DataSyncPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export class DataSyncPlugin extends GraphbackPlugin {
DeltaOTC.addFields({ [field.name]: field.type.toString() })
}

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

DeltaOTC.addFields({
[DataSyncFieldNames.deleted]: GraphQLBoolean
})

// Create and Add Delta List type to schema
const DeltaListOTC = schemaComposer.createObjectTC({
name: getDeltaListType(modelName),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ type CommentDelta {
title: String
description: String
noteId: ID
\\"\\"\\"@index(name: 'Datasync_lastUpdatedAt')\\"\\"\\"
_lastUpdatedAt: GraphbackTimestamp
_deleted: Boolean
}
Expand Down Expand Up @@ -134,6 +137,9 @@ type NoteDelta {
title: String
description: String
mainCommentId: ID
\\"\\"\\"@index(name: 'Datasync_lastUpdatedAt')\\"\\"\\"
_lastUpdatedAt: GraphbackTimestamp
_deleted: Boolean
}
Expand Down Expand Up @@ -241,6 +247,9 @@ type CommentDelta {
title: String
description: String
_version: Int!
\\"\\"\\"@index(name: 'Datasync_lastUpdatedAt')\\"\\"\\"
_lastUpdatedAt: GraphbackTimestamp
_deleted: Boolean
}
Expand Down Expand Up @@ -371,6 +380,9 @@ type CommentDelta {
id: ID!
title: String
description: String
\\"\\"\\"@index(name: 'Datasync_lastUpdatedAt')\\"\\"\\"
_lastUpdatedAt: GraphbackTimestamp
_deleted: Boolean
}
Expand Down

0 comments on commit a99a718

Please sign in to comment.