question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DataStore predicates without Predicates.ALL specified usage question

See original GitHub issue

Note: If your question is regarding the AWS Amplify Console service, please log it in the official AWS Amplify Console forum

Which Category is your question related to? DataStore

Amplify CLI Version

4.29.6

What AWS Services are you utilizing? Amplify, DataStore

Provide additional details e.g. code snippets I’m wondering if its possible to use pagination when not using predicates.all on a set of data. Below works fine…

const messages = await DataStore.query(Message, Predicates.ALL, { page: 0, limit: 100 });

But what about if I want to limit the following filtered results…

const messages = await DataStore.query(Message, (m) => m.msgConvID('eq', conversationId) )

Is it possible to paginate these filtered results without using a slice on front end, thank you!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
renebrandelcommented, Oct 15, 2020

transferring this to JS repo. cc @sammartinez

0reactions
github-actions[bot]commented, Oct 16, 2021

This issue has been automatically locked since there hasn’t been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[RFC] DataStore predicate grammar · Issue #8901 - GitHub
This RFC is to gather customer feedback around Amplify DataStore's grammar and handling of the logical operator grouping ( and , or ,...
Read more >
Predicate - AmplifyUIBuilder - AWS Documentation
Stores information for generating Amplify DataStore queries. Use a Predicate to retrieve a subset of the data in a collection.
Read more >
AWS Amplify datastore query and sort by date - Stack Overflow
The createdAt method takes in a string either "ASCENDING" or "DESCENDING". Try this: const messages = await DataStore.query(Message, Predicates.ALL, { sort: ...
Read more >
DataStore - Manipulating data - JavaScript - AWS Amplify Docs
Predicates. Predicates are filters that can be used to match items in the DataStore. When applied to a query(), they constrain the returned...
Read more >
AWS Amplify For Flutter Part 2: Amplify DataStore
Predicates can be used to query data from DataStore. Predicates act as a filter that matches data from the database. They're passed as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found