@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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/api-graphql",
3
- "version": "4.0.1-api-v6-models.6a7a338.0+6a7a338",
3
+ "version": "4.0.1-api-v6-models.cfd348e.0+cfd348e",
4
4
  "description": "Api-graphql category of aws-amplify",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib-esm/index.js",
@@ -51,10 +51,10 @@
51
51
  "internals"
52
52
  ],
53
53
  "dependencies": {
54
- "@aws-amplify/amplify-api-next-types-alpha": "^0.2.5",
55
- "@aws-amplify/api-rest": "4.0.1-api-v6-models.6a7a338.0+6a7a338",
56
- "@aws-amplify/auth": "6.0.1-api-v6-models.6a7a338.0+6a7a338",
57
- "@aws-amplify/core": "6.0.1-api-v6-models.6a7a338.0+6a7a338",
54
+ "@aws-amplify/amplify-api-next-types-alpha": "^0.2.8",
55
+ "@aws-amplify/api-rest": "4.0.1-api-v6-models.cfd348e.0+cfd348e",
56
+ "@aws-amplify/auth": "6.0.1-api-v6-models.cfd348e.0+cfd348e",
57
+ "@aws-amplify/core": "6.0.1-api-v6-models.cfd348e.0+cfd348e",
58
58
  "@aws-sdk/types": "3.387.0",
59
59
  "graphql": "15.8.0",
60
60
  "rxjs": "^7.8.1",
@@ -127,5 +127,5 @@
127
127
  "<rootDir>/__tests__"
128
128
  ]
129
129
  },
130
- "gitHead": "6a7a338c1dd75d5677c6d9b5ea671c99b96db61d"
130
+ "gitHead": "cfd348e6067d59551a617b200afbd2824b82daf7"
131
131
  }
@@ -10,6 +10,8 @@ type ListArgs = { selectionSet?: string[]; filter?: {} };
10
10
  type LazyLoadOptions = {
11
11
  authMode?: GraphQLAuthMode;
12
12
  authToken?: string | undefined;
13
+ limit?: number | undefined;
14
+ nextToken?: string | undefined | null;
13
15
  };
14
16
 
15
17
  const connectionType = {
@@ -160,6 +162,8 @@ export function initializeModel(
160
162
  if (record[parentPk]) {
161
163
  return client.models[relatedModelName].list(contextSpec, {
162
164
  filter: { and: hasManyFilter },
165
+ limit: options?.limit,
166
+ nextToken: options?.nextToken,
163
167
  authMode: options?.authMode || authMode,
164
168
  authToken: options?.authToken || authToken,
165
169
  });
@@ -173,6 +177,8 @@ export function initializeModel(
173
177
  if (record[parentPk]) {
174
178
  return client.models[relatedModelName].list({
175
179
  filter: { and: hasManyFilter },
180
+ limit: options?.limit,
181
+ nextToken: options?.nextToken,
176
182
  authMode: options?.authMode || authMode,
177
183
  authToken: options?.authToken || authToken,
178
184
  });
@@ -200,6 +206,8 @@ export function initializeModel(
200
206
  if (record[parentPk]) {
201
207
  return client.models[relatedModelName].list(contextSpec, {
202
208
  filter: { and: hasManyFilter },
209
+ limit: options?.limit,
210
+ nextToken: options?.nextToken,
203
211
  authMode: options?.authMode || authMode,
204
212
  authToken: options?.authToken || authToken,
205
213
  });
@@ -213,6 +221,8 @@ export function initializeModel(
213
221
  if (record[parentPk]) {
214
222
  return client.models[relatedModelName].list({
215
223
  filter: { and: hasManyFilter },
224
+ limit: options?.limit,
225
+ nextToken: options?.nextToken,
216
226
  authMode: options?.authMode || authMode,
217
227
  authToken: options?.authToken || authToken,
218
228
  });
@@ -600,6 +610,9 @@ export function buildGraphQLVariables(
600
610
  if (arg?.nextToken) {
601
611
  variables.nextToken = arg.nextToken;
602
612
  }
613
+ if (arg?.limit) {
614
+ variables.limit = arg.limit;
615
+ }
603
616
  break;
604
617
  case 'ONCREATE':
605
618
  case 'ONUPDATE':