Skip to content

misc-training/graphql-example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%