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
+189Lines changed: 189 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4023,6 +4023,195 @@ exports[`custom references hasMany with sortKeyFields on primary key 1`] = `
4023
4023
}"
4024
4024
`;
4025
4025
4026
+
exports[`custom references hasOne with sortKeyFields on primary key 1`] =`
4027
+
"{
4028
+
\\"version\\": 1,
4029
+
\\"models\\": {
4030
+
\\"Primary\\": {
4031
+
\\"name\\": \\"Primary\\",
4032
+
\\"fields\\": {
4033
+
\\"tenantId\\": {
4034
+
\\"name\\": \\"tenantId\\",
4035
+
\\"isArray\\": false,
4036
+
\\"type\\": \\"ID\\",
4037
+
\\"isRequired\\": true,
4038
+
\\"attributes\\": []
4039
+
},
4040
+
\\"instanceId\\": {
4041
+
\\"name\\": \\"instanceId\\",
4042
+
\\"isArray\\": false,
4043
+
\\"type\\": \\"ID\\",
4044
+
\\"isRequired\\": true,
4045
+
\\"attributes\\": []
4046
+
},
4047
+
\\"recordId\\": {
4048
+
\\"name\\": \\"recordId\\",
4049
+
\\"isArray\\": false,
4050
+
\\"type\\": \\"ID\\",
4051
+
\\"isRequired\\": true,
4052
+
\\"attributes\\": []
4053
+
},
4054
+
\\"content\\": {
4055
+
\\"name\\": \\"content\\",
4056
+
\\"isArray\\": false,
4057
+
\\"type\\": \\"String\\",
4058
+
\\"isRequired\\": false,
4059
+
\\"attributes\\": []
4060
+
},
4061
+
\\"related\\": {
4062
+
\\"name\\": \\"related\\",
4063
+
\\"isArray\\": false,
4064
+
\\"type\\": {
4065
+
\\"model\\": \\"Related\\"
4066
+
},
4067
+
\\"isRequired\\": false,
4068
+
\\"attributes\\": [],
4069
+
\\"association\\": {
4070
+
\\"connectionType\\": \\"HAS_ONE\\",
4071
+
\\"associatedWith\\": [
4072
+
\\"primaryTenantId\\",
4073
+
\\"primaryInstanceId\\",
4074
+
\\"primaryRecordId\\"
4075
+
],
4076
+
\\"targetNames\\": []
4077
+
}
4078
+
},
4079
+
\\"createdAt\\": {
4080
+
\\"name\\": \\"createdAt\\",
4081
+
\\"isArray\\": false,
4082
+
\\"type\\": \\"AWSDateTime\\",
4083
+
\\"isRequired\\": false,
4084
+
\\"attributes\\": [],
4085
+
\\"isReadOnly\\": true
4086
+
},
4087
+
\\"updatedAt\\": {
4088
+
\\"name\\": \\"updatedAt\\",
4089
+
\\"isArray\\": false,
4090
+
\\"type\\": \\"AWSDateTime\\",
4091
+
\\"isRequired\\": false,
4092
+
\\"attributes\\": [],
4093
+
\\"isReadOnly\\": true
4094
+
}
4095
+
},
4096
+
\\"syncable\\": true,
4097
+
\\"pluralName\\": \\"Primaries\\",
4098
+
\\"attributes\\": [
4099
+
{
4100
+
\\"type\\": \\"model\\",
4101
+
\\"properties\\": {}
4102
+
},
4103
+
{
4104
+
\\"type\\": \\"key\\",
4105
+
\\"properties\\": {
4106
+
\\"fields\\": [
4107
+
\\"tenantId\\",
4108
+
\\"instanceId\\",
4109
+
\\"recordId\\"
4110
+
]
4111
+
}
4112
+
}
4113
+
],
4114
+
\\"primaryKeyInfo\\": {
4115
+
\\"isCustomPrimaryKey\\": true,
4116
+
\\"primaryKeyFieldName\\": \\"tenantId\\",
4117
+
\\"sortKeyFieldNames\\": [
4118
+
\\"instanceId\\",
4119
+
\\"recordId\\"
4120
+
]
4121
+
}
4122
+
},
4123
+
\\"Related\\": {
4124
+
\\"name\\": \\"Related\\",
4125
+
\\"fields\\": {
4126
+
\\"id\\": {
4127
+
\\"name\\": \\"id\\",
4128
+
\\"isArray\\": false,
4129
+
\\"type\\": \\"ID\\",
4130
+
\\"isRequired\\": true,
4131
+
\\"attributes\\": []
4132
+
},
4133
+
\\"content\\": {
4134
+
\\"name\\": \\"content\\",
4135
+
\\"isArray\\": false,
4136
+
\\"type\\": \\"String\\",
4137
+
\\"isRequired\\": false,
4138
+
\\"attributes\\": []
4139
+
},
4140
+
\\"primaryTenantId\\": {
4141
+
\\"name\\": \\"primaryTenantId\\",
4142
+
\\"isArray\\": false,
4143
+
\\"type\\": \\"ID\\",
4144
+
\\"isRequired\\": true,
4145
+
\\"attributes\\": []
4146
+
},
4147
+
\\"primaryInstanceId\\": {
4148
+
\\"name\\": \\"primaryInstanceId\\",
4149
+
\\"isArray\\": false,
4150
+
\\"type\\": \\"ID\\",
4151
+
\\"isRequired\\": true,
4152
+
\\"attributes\\": []
4153
+
},
4154
+
\\"primaryRecordId\\": {
4155
+
\\"name\\": \\"primaryRecordId\\",
4156
+
\\"isArray\\": false,
4157
+
\\"type\\": \\"ID\\",
4158
+
\\"isRequired\\": true,
4159
+
\\"attributes\\": []
4160
+
},
4161
+
\\"primary\\": {
4162
+
\\"name\\": \\"primary\\",
4163
+
\\"isArray\\": false,
4164
+
\\"type\\": {
4165
+
\\"model\\": \\"Primary\\"
4166
+
},
4167
+
\\"isRequired\\": false,
4168
+
\\"attributes\\": [],
4169
+
\\"association\\": {
4170
+
\\"connectionType\\": \\"BELONGS_TO\\",
4171
+
\\"targetNames\\": [
4172
+
\\"primaryTenantId\\",
4173
+
\\"primaryInstanceId\\",
4174
+
\\"primaryRecordId\\"
4175
+
]
4176
+
}
4177
+
},
4178
+
\\"createdAt\\": {
4179
+
\\"name\\": \\"createdAt\\",
4180
+
\\"isArray\\": false,
4181
+
\\"type\\": \\"AWSDateTime\\",
4182
+
\\"isRequired\\": false,
4183
+
\\"attributes\\": [],
4184
+
\\"isReadOnly\\": true
4185
+
},
4186
+
\\"updatedAt\\": {
4187
+
\\"name\\": \\"updatedAt\\",
4188
+
\\"isArray\\": false,
4189
+
\\"type\\": \\"AWSDateTime\\",
4190
+
\\"isRequired\\": false,
4191
+
\\"attributes\\": [],
4192
+
\\"isReadOnly\\": true
4193
+
}
4194
+
},
4195
+
\\"syncable\\": true,
4196
+
\\"pluralName\\": \\"Relateds\\",
4197
+
\\"attributes\\": [
4198
+
{
4199
+
\\"type\\": \\"model\\",
4200
+
\\"properties\\": {}
4201
+
}
4202
+
],
4203
+
\\"primaryKeyInfo\\": {
4204
+
\\"isCustomPrimaryKey\\": false,
4205
+
\\"primaryKeyFieldName\\": \\"id\\",
4206
+
\\"sortKeyFieldNames\\": []
4207
+
}
4208
+
}
4209
+
},
4210
+
\\"enums\\": {},
4211
+
\\"nonModels\\": {}
4212
+
}"
4213
+
`;
4214
+
4026
4215
exports[`custom references sets the association to the references field for hasMany/belongsTo 1`] =`
0 commit comments