Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apollo GraphQL Server vs graphql-sequelize vs from scratch?

I'm a beginner to javascript and GraphQL, looking to implement a simple app that interacts with a MySQL database and wraps a 3rd party REST API. GraphQL seems like the right fit, and Javascript has first party support.

To get started, should I use Apollo's GraphQL Server or mickhansen's graphql-sequelize (with his dataloader-sequelize) or write one from scratch?

In all cases it seems to use sequelize under the hood, which mickhansen is a major contributor to.

I'm looking for the advice and analysis of more experienced javascript and GraphQL programmers.

I realise the final decision is subjective but I'm looking for a thought out pro/con of all 3 different solutions.

Thanks in advance!

like image 341
Finlay Beaton Avatar asked Jul 12 '26 17:07

Finlay Beaton


1 Answers

I would recommend not to start writing your server from scratch, but to use existing libraries and seed projects. Personally, I use Typescript with the Apollo stack, combined with several other libraries for splitting the schema to files, and auto-generating types. This post demonstrates how to modularize your graphql server code, providing a seed project you can clone. Hope it helps! :)

like image 53
Tom Avatar answered Jul 14 '26 09:07

Tom



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!