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 SYNC query builder does not allow/include filter by owner

See original GitHub issue

Describe the bug The DataStore is not including the owner as part of the sync query. Unless this is a limitation on how AppSync implements/expects sync, I think this is a BUG and causes scalability issues.

To Reproduce

  1. Install and init
  2. Implement a simple schema with type having @model and @auth
  3. Configure @auth to include owner
  4. Configure DataStore

Expected behavior The DataStore internally builds all queries and mutations. Since we have @auth with owner, it is expected that the owner field is populated on all queries, including sync queries. This is not the case.

Code Snippet Here’s where the SYNC query is built. The query does not allows for passing filter. https://github.com/aws-amplify/amplify-js/blob/main/packages/datastore/src/sync/utils.ts#L268-L278

   documentArgs = `($limit: Int, $nextToken: String, $lastSync: AWSTimestamp)`;

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
iartemievcommented, Oct 20, 2020

Hey @abdielou, you will be able to pass a filter to the sync query once the feature in this PR gets released

0reactions
github-actions[bot]commented, Oct 21, 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

How can I create a dynamic query in Amplify Datastore
let just say you have an object which defines what user can use what filter queries. Here I assumed user can be of...
Read more >
R2022-06 (cumulative patch) - 7.3 - Talend Help Center
From version 7.3.10 onwards, Talend CI Builder is available in the ... Combination of distinct and filtering on same loop does not work ......
Read more >
@ember-data/private-build-infra | Yarn - Package Manager
EmberData is a lightweight reactive data library for JavaScript applications that provides composable primitives for ordering query/mutation/peek flows, ...
Read more >
Migrator for Notes to Exchange 4.15.2 Program Parameters ...
for sites that do not require free/busy synchronization through the Connector. ... AD search query, to tell the program which AD user objects...
Read more >
Untitled
... Bump version to 1.3.9.1-3 - Resolves: Bug 1651279 - The dirsrv user is no ... rootfs-generator: don't set JobRunningTimeoutSec - Sync initramfs...
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