DEV Community

Introducing Conference App in a Box

Nader Dabit on July 18, 2019

Deploy a themeable, customizable, full stack and cross-platform mobile app for your next event in minutes. πŸ›  Built with React Native, Gr...
Collapse
 
getterhiss profile image
Getter Hiss

@dabit3 Nader, just curious if this is expected behavior with the AWS GraphQL endpoint.

listTalks(filter: {name: {contains: β€œGetter”}}, limit: 1)

I get zero results, but nextToken is populated. When I query that, I get my result(s).

Seems like the expected behavior should be to filter, then run limit. It’s running limit on the records, then filtering.

Collapse
 
dabit3 profile image
Nader Dabit

So I think the issue here is that, by default, this query will perform a scan operation and then a filter on the scanned items. By default, I think the number that it returns is 10, so if your item is not contained in the first 10 items it will return zero and a next token.

You could instead update the operation to be a query vs a scan (by using the @key directive), or you could increase the limit.

This is more of a quirk / implementation detail of DynamoDB than anything else.

The scan operation will scan every item in a db (or the first n items if we set a limit, in our case 1) and then perform a filter on those results. By contrast, a query will only query on a set key, so in general for larger data sets a query is the way to go.

aws-amplify.github.io/docs/cli-too...

Collapse
 
getterhiss profile image
Getter Hiss

Yeah, it seems like a DynamoDB quirk. I only had about 4 records and limit: 1 to test filtering.

I never jumped on the NoSQL bandwagon. Give me SQL anyday. I find most data, for 99% of applications out there, is relational. Not to mention most won't run up against scaling issues with just using Postgres.

Have you thought about doing this same Amplify GraphQL example with Amazon Aurora Serverless? I think it'd be great to compare them side-by-side.

Thread Thread
 
dabit3 profile image
Nader Dabit

One of my favorite videos that shows what NoSQL can do is this one: youtube.com/watch?v=HaEPXoXVf2k , it also goes into theory around by NoSQL has become so popular. We're definitely working on more support as well for relational databases, you'll see more from us later this year.

Collapse
 
younesh1989 profile image
Younes Henni

Spot on Nader.

Collapse
 
markpieszak profile image
Mark Pieszak

πŸ₯‡πŸ₯‡πŸ₯‡

Collapse
 
efleurine profile image
Emmanuel

I might need something similar for our dev conference in Haiti πŸ‡­πŸ‡Ή this November. That will be a very good start

Collapse
 
dabit3 profile image
Nader Dabit

Awesome, let me know if I can help you in any way!

Collapse
 
anthonybrown profile image
Tony Brown

Nice work @Nader. β€οΈπŸ’£πŸ€―πŸ”₯πŸ’₯

Collapse
 
slopeofhope81 profile image
Steve Lim

Just out of curiosity, if I don't use expo, does Amplify have a way/tool to release the react-native bundle to the app store?

Collapse
 
dabit3 profile image
Nader Dabit

Hi Steve. No, Amplify does not offer this directly, but you should be able to bundle to .ipa or .apk directly from either Xcode (iOS) or from the command line (Android)

Collapse
 
leland_smith_08eaf1e45d59 profile image
Leland SMITH

This is an awesome App. Thanks Nadder. I am having one strange problem.
has anyone had problems displaying images? I can not get the logo or speaker Avatar to display.