Skip to content

Commit e808675

Browse files
arkapratimcRachel Lee Nabors
authored andcommitted
There were many extra ')' in this page (#5004)
* There was 1 extra ')' here * The same mistake was done in multiple places rather
1 parent 7ffcd82 commit e808675

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/fragments/lib/graphqlapi/js/query-data.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ let filter = {
116116
eq: 1 // filter priority = 1
117117
}
118118
};
119-
await API.graphql({ query: listProducts, variables: { filter: filter}}));
119+
await API.graphql({ query: listProducts, variables: { filter: filter}});
120120
```
121121

122122
### Compound Filters
@@ -128,7 +128,7 @@ let filter = {
128128
or: [{ priority: {eq:1} },
129129
{ priority: {eq:2} }]
130130
};
131-
await API.graphql({ query: listProducts, variables: { filter: filter}}));
131+
await API.graphql({ query: listProducts, variables: { filter: filter}});
132132
```
133133

134134
Note that querying for `priority` of 1 AND 2 would return no results, because this is boolean logic instead of natural language.
@@ -139,11 +139,11 @@ Pagination in AppSync is done by making a request with a `limit`, and getting ba
139139

140140
```js
141141
// page 1 of query
142-
const { data: { listProducts: { items: itemsPage1, nextToken } } } = await API.graphql({ query: listProducts, variables: { limit: 20, /* add filter as needed */ }}));
142+
const { data: { listProducts: { items: itemsPage1, nextToken } } } = await API.graphql({ query: listProducts, variables: { limit: 20, /* add filter as needed */ }});
143143
// // You are assuming that `listProducts` includes a query for `nextToken`, which is the case for autogenerated GraphQL query strings.
144144

145145
// page 2 of query
146-
const { data: { listProducts: { items: itemsPage2 } } } = await API.graphql({ query: listProducts, variables: { limit: 20, nextToken }}));
146+
const { data: { listProducts: { items: itemsPage2 } } } = await API.graphql({ query: listProducts, variables: { limit: 20, nextToken }});
147147
```
148148

149149
A `nextToken` is a very long string that looks like `"eyJ2ZXJzaW9uejE1a2RPanZPQzFCMlFTdGNxdUFBQUJxekNDQWFjR0NTcUdTSWIzRFFFSEJxQ0NBWmd3Z2dHVUFnRUFNSUlCalFZSktvWklodmNOQVFjQk1CNEdDV0NHU0FGbEF3UUJMakFSQkF5eEtWQjUvTlJxS2o5ZHBYc0NBUkNBZ2dGZUZFNW1MbTRkb25BOUg0U0FpOGhSZ1lucmRndmQz"` which represents the cursor to the starting item of the next query made with these filters.

0 commit comments

Comments
 (0)