Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ogubuikealex/graphql-crud-article

How To Implement CRUD using GraphQL, NodeJS, Express, and MongoDB
https://github.com/ogubuikealex/graphql-crud-article

crud crud-app crud-application crud-functionality crud-operation crud-sample graphql javascript nodejs-api nodejs-server typescript

Last synced: about 21 hours ago
JSON representation

How To Implement CRUD using GraphQL, NodeJS, Express, and MongoDB

Awesome Lists containing this project

README

        

# How To Implement CRUD using GraphQL, NodeJS, Express, and MongoDB

In this article series, we are going to walk through a simplified step-by-step guide to implementing CRUD using GraphQL in NodeJS.

[Part one](https://medium.com/@ogubuikealex/how-to-implement-crud-using-graphql-nodejs-express-and-mongodb-part-one-b573f020d7f5) started by showing us how to setup the project. Then we looked at how to performing different kinds of read operations including
- create a root query
- fetching all resources
- fetching a resource by its Id
- fetching a resource/ list of resources
- fetching a resource with nested objects within it, etc.

[Part Two](https://medium.com/@ogubuikealex/how-to-implement-crud-using-graphql-nodejs-express-and-mongodb-part-two-433c376d42f0) takes over and shows us how we can
- create a root mutation
- create a resource
- update a resource
- delete a resource

Part two has a bonus section, where we optimize the root query by seperating concerns
At the end? We transformed it from 57 lines of code to 9 lines code!