You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-model-introspection-visitor.test.ts.snap
+147Lines changed: 147 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2173,3 +2173,150 @@ exports[`Primary Key Info tests should generate correct primary key info for mod
2173
2173
\\"nonModels\\": {}
2174
2174
}"
2175
2175
`;
2176
+
2177
+
exports[`Primary key info within a belongsTo model tests should generate correct primary key info for model when the primary key field is part of belongsTo connection field and custom PK is disabled 1`] =`
describe('Primary key info within a belongsTo model tests',()=>{
216
+
constschema=/* GraphQL */`
217
+
type Post @model {
218
+
postId: ID! @primaryKey
219
+
node: PostNode! @belongsTo(fields: ["postId"])
220
+
title: String!
221
+
}
222
+
type PostNode @model {
223
+
id: ID!
224
+
post: Post! @hasOne
225
+
}
226
+
`;
227
+
it('should generate correct primary key info for model when the primary key field is part of belongsTo connection field and custom PK is disabled',()=>{
0 commit comments