Skip to content

Commit 705ac3a

Browse files
authored
fix: add owner field to conversation model (#893)
1 parent fac63c1 commit 705ac3a

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-model-introspection-visitor.test.ts.snap

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,13 @@ exports[`Conversation Route Introspection Visitor Metadata snapshot should gener
9898
\\"isArray\\": false,
9999
\\"isRequired\\": false,
100100
\\"isReadOnly\\": true
101+
},
102+
\\"owner\\": {
103+
\\"name\\": \\"owner\\",
104+
\\"type\\": \\"String\\",
105+
\\"attributes\\": [],
106+
\\"isArray\\": false,
107+
\\"isRequired\\": false
101108
}
102109
},
103110
\\"syncable\\": true,

packages/appsync-modelgen-plugin/src/utils/process-conversation.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ function generateConversationModel(modelName: string, messageModelName: string):
6060
messages: generateMessagesField(messageModelName),
6161
createdAt: generateTimestampField('createdAt'),
6262
updatedAt: generateTimestampField('updatedAt'),
63+
owner: generateField('owner', 'String'),
6364
},
6465
syncable: true,
6566
pluralName: plural(modelName),

0 commit comments

Comments
 (0)