@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.
@@ -102,6 +102,8 @@ function initializeModel(client, modelName, result, modelIntrospection, authMode
102
102
  if (record[parentPk]) {
103
103
  return client.models[relatedModelName].list(contextSpec, {
104
104
  filter: { and: hasManyFilter },
105
+ limit: options?.limit,
106
+ nextToken: options?.nextToken,
105
107
  authMode: options?.authMode || authMode,
106
108
  authToken: options?.authToken || authToken,
107
109
  });
@@ -114,6 +116,8 @@ function initializeModel(client, modelName, result, modelIntrospection, authMode
114
116
  if (record[parentPk]) {
115
117
  return client.models[relatedModelName].list({
116
118
  filter: { and: hasManyFilter },
119
+ limit: options?.limit,
120
+ nextToken: options?.nextToken,
117
121
  authMode: options?.authMode || authMode,
118
122
  authToken: options?.authToken || authToken,
119
123
  });
@@ -134,6 +138,8 @@ function initializeModel(client, modelName, result, modelIntrospection, authMode
134
138
  if (record[parentPk]) {
135
139
  return client.models[relatedModelName].list(contextSpec, {
136
140
  filter: { and: hasManyFilter },
141
+ limit: options?.limit,
142
+ nextToken: options?.nextToken,
137
143
  authMode: options?.authMode || authMode,
138
144
  authToken: options?.authToken || authToken,
139
145
  });
@@ -146,6 +152,8 @@ function initializeModel(client, modelName, result, modelIntrospection, authMode
146
152
  if (record[parentPk]) {
147
153
  return client.models[relatedModelName].list({
148
154
  filter: { and: hasManyFilter },
155
+ limit: options?.limit,
156
+ nextToken: options?.nextToken,
149
157
  authMode: options?.authMode || authMode,
150
158
  authToken: options?.authToken || authToken,
151
159
  });
@@ -408,6 +416,9 @@ function buildGraphQLVariables(modelDefinition, operation, arg, modelIntrospecti
408
416
  if (arg?.nextToken) {
409
417
  variables.nextToken = arg.nextToken;
410
418
  }
419
+ if (arg?.limit) {
420
+ variables.limit = arg.limit;
421
+ }
411
422
  break;
412
423
  case 'ONCREATE':
413
424
  case 'ONUPDATE':