@aws-amplify/api-graphql 4.0.1-api-v6-models.6a7a338.0 → 4.0.1-api-v6-models.cfd348e.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -98,6 +98,8 @@ export function initializeModel(client, modelName, result, modelIntrospection, a
98
98
  if (record[parentPk]) {
99
99
  return client.models[relatedModelName].list(contextSpec, {
100
100
  filter: { and: hasManyFilter },
101
+ limit: options?.limit,
102
+ nextToken: options?.nextToken,
101
103
  authMode: options?.authMode || authMode,
102
104
  authToken: options?.authToken || authToken,
103
105
  });
@@ -110,6 +112,8 @@ export function initializeModel(client, modelName, result, modelIntrospection, a
110
112
  if (record[parentPk]) {
111
113
  return client.models[relatedModelName].list({
112
114
  filter: { and: hasManyFilter },
115
+ limit: options?.limit,
116
+ nextToken: options?.nextToken,
113
117
  authMode: options?.authMode || authMode,
114
118
  authToken: options?.authToken || authToken,
115
119
  });
@@ -130,6 +134,8 @@ export function initializeModel(client, modelName, result, modelIntrospection, a
130
134
  if (record[parentPk]) {
131
135
  return client.models[relatedModelName].list(contextSpec, {
132
136
  filter: { and: hasManyFilter },
137
+ limit: options?.limit,
138
+ nextToken: options?.nextToken,
133
139
  authMode: options?.authMode || authMode,
134
140
  authToken: options?.authToken || authToken,
135
141
  });
@@ -142,6 +148,8 @@ export function initializeModel(client, modelName, result, modelIntrospection, a
142
148
  if (record[parentPk]) {
143
149
  return client.models[relatedModelName].list({
144
150
  filter: { and: hasManyFilter },
151
+ limit: options?.limit,
152
+ nextToken: options?.nextToken,
145
153
  authMode: options?.authMode || authMode,
146
154
  authToken: options?.authToken || authToken,
147
155
  });
@@ -399,6 +407,9 @@ export function buildGraphQLVariables(modelDefinition, operation, arg, modelIntr
399
407
  if (arg?.nextToken) {
400
408
  variables.nextToken = arg.nextToken;
401
409
  }
410
+ if (arg?.limit) {
411
+ variables.limit = arg.limit;
412
+ }
402
413
  break;
403
414
  case 'ONCREATE':
404
415
  case 'ONUPDATE':