arunkrguptaa / graphql-example

GraphQL Example project for Toptal blog article

Home Page:https://www.toptal.com/api-development/graphql-vs-rest-tutorial#utilize-unreal-developers-today

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

graphql-example

GraphQL Example project for Toptal blog article: https://www.toptal.com/api-development/graphql-vs-rest-tutorial#utilize-unreal-developers-today

Getting Started

git clone https://github.com/amaurymartiny/graphql-example
cd graphql-example
npm install
npm run dev

You should be able to see the app running at http://localhost:3000.

Information

  • The models folder contains the three models: User, Project and Task. They are created using the sequelize ORM.
  • The rest folder contains the logic to create the associated /api/users, /api/projects and /api/tasks endpoints.
  • The graphql folder contains the schema and resolvers for GraphQL.
  • db.sqlite contains the database.
  • index.js starts the Express server.

Demo

This example project is hosted on Heroku.

About

GraphQL Example project for Toptal blog article

https://www.toptal.com/api-development/graphql-vs-rest-tutorial#utilize-unreal-developers-today


Languages

Language:JavaScript 100.0%