Skip to content
This repository was archived by the owner on Jun 3, 2020. It is now read-only.
This repository was archived by the owner on Jun 3, 2020. It is now read-only.

Wouldn't this be an expensive query? #1

@nubpro

Description

@nubpro

https://github.com/aws-samples/aws-appsync-refarch-offline/blob/master/src/components/Orders/index.js

I noticed that you subscribed to the Order model in line 15 and its purpose is to re-query all the orders again and re-sort them.

So for every new order or changes to an order, you would do this all over again.
Say in a minute, there's over 100 changes to the respective orders, wouldn't this impact the overall performance of the app?


To that, I would like to continue my conversation over from here.
In my usecase, after a user logs out and relogs back in, querying the Order model doesn't yield any results at all. But instead, using the subscription, it would return each and every orders.
For every orders, I had to query the Order model to get all orders again and like the example given, I would re-sort them every time. Isn't that overkill?

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions