DEV Community

Discussion on: How To Create An API 10 Times Faster?

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt

What about SELECT / projection? And Pagination?

Collapse
 
iozguradem profile image
Özgür Adem Işıklı

If you have a model called User.js, as default, fetching all records is active via the route api/users. In that route, we paginate rows as default because of performance issues.

You may find full documentation about it in here: adonisx.github.io/03-routes/#auto-...

Also, you can filter data with query parameters as described in here

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt • Edited

Will it be more complete than GraphQL from scratch?

So, I should try Adonis and AdonisX. Not sure how to get started.

I always started from scratch, rarely from complete system, like Adonis, Nest, Django or Angular...

Thread Thread
 
iozguradem profile image
Özgür Adem Işıklı

Will it be more complete than GraphQL from scratch?

We don't aim to be good than GraphQL. I think it solves different problems. We just focus to create APIs quickly. We need to test this project real-world scenarios more.

So, I should try Adonis and AdonisX. Not sure how to get started.

I can suggest that you to start with AdonisJs Documentation. They are helpful.