Very easy graphQL example made by Bobby Chao

Overview

graphQL-express-MySQL-example

Very easy graphQL example made by Bobby Chao.

The folder has been organized, the module has been split, and it can be directly used as a development scratch.

It is using graphQL + node.js + express, and MySQL as datasource.

How to use?

  1. Download this repo.
  2. Create a database, and import the SQL from /database/db.sql file.
  3. Modify config/db.config.js file, change the db password and db name.
  4. Open repo, and execute npm i
  5. Ok, done, run it node index.js
  6. Visit http://localhost:4000 in your browser
  7. Try to run below query, get all posts records and its user infos.
{
  posts {
    id
    title
    content
    user {
      id
      email
      name
    }
  }
}

Folder description

config: your database configuration

database:

  • index.js : used to init the database connection and db query method.

resolvers:

  • Query: used to store all of your queries.
  • Mutation: used to store all of your mutations.

types: used to store all data type definitions.

schema: entry of graphQL

You might also like...

Código desenvolvido na mentoria do Hiring Coders utilizando Express e GraphQL

hiringcoders-graphql Código desenvolvido na mentoria do Hiring Coders utilizando Express e GraphQL Contribuições A ideia do repositório é continuar si

Dec 29, 2022

A lightweight way to cache on graphQL servers

A lightweight way to cache on graphQL servers

cacheflowQL What is cacheflowQL? CacheflowQL is an npm package with complex caching algorithms that provide developers deep insights into their GraphQ

Nov 16, 2022

A template for WebSockets powered Cloudflare Worker project using graphql-ws

🚡 graphql-ws on Cloudflare Workers A template for WebSockets powered Cloudflare Worker project using graphql-ws. The worker serves the following rout

Dec 18, 2022

Unofficial API Documentation for the Axie Infinity's GraphQL Endpoint.

Axie GraphQL Documentation API Documentation for the Axie Infinity GraphQL Endpoint. Customization Guide This site is usings rocketseat. You may refer

Nov 24, 2022

A Crypto App built to pracitse GraphQL Federation

Getting Started To start this project please first create a .env file in the root of your project with the following: REACT_APP_ASTRA_TOKEN={your_astr

Dec 28, 2022

A GraphQL Generator for Mongo and CosmosDB

A GraphQL Generator for Mongo and CosmosDB

A GraphQL Function Starter Kit for Cosmos DB This is a starter kit for rapid development of a GraphQL API using the Mongo driver for Cosmos DB. You cr

Nov 12, 2021

Graphql & Apollo

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts After fetch the project, please install n

Dec 21, 2021

Ecommerce-backend-nestjs - Ecommerce app with Nestjs + Prisma ORM + GraphQL + SQLite

ECOMMERCE BACKEND NESTJS APP Nestjs + Prisma ORM + GraphQL + SQLite USER Create Account Login Product Create Product Get Products Get Product Search P

Apr 6, 2022

GraphQL API Playground with cascade-like operations

modif ( 🍖 👉 🥪 ) modif is a small GraphQL API with transform capabilities. It takes a string input and outputs a string. Always. TL;DR Go play with

Jan 4, 2022
Owner
Bobby Chao
System architect and Senior full stack developer. Focusing on the architecture and development of high-performance and high-concurrency modern mobile Apps.
Bobby Chao
curl for GraphQL with autocomplete, subscriptions and GraphiQL. Also a dead-simple universal javascript GraphQL client.

graphqurl graphqurl is a curl like CLI for GraphQL. It's features include: CLI for making GraphQL queries. It also provisions queries with autocomplet

Hasura 3.2k Jan 3, 2023
GraphQL Fastify Server is an implementation of GraphQL.

GraphQL Fastify Server Installation Usage Using cache Middlewares Liveness & Readiness Contributing License Installation npm install --save graphql-fa

Rui Silva 33 Dec 19, 2022
Application made to show the basic concepts of GraphQL with Apollo Server

graphql-insta-example Application made to show the basic concepts of GraphQL with Apollo Server. Getting Started Run npm install Run npm run dev Go to

Ana Julia Bittencourt 26 Aug 26, 2022
graphql-codegen plugin to generate type-safe, easy-to use hooks for Flutter

graphql-codegen-flutter-artemis-hooks This is graphql-codegen plugin to generate type-safe, easy-to use Flutter artemis hooks. For further detail, see

seya 18 Jan 2, 2023
⛏ Mining Infrastructure Made Easy

Carrot Pool Enterprise proof-of-work infrastructure & API for blockchain mining. Setup & Install » Demo · Report Bug · Roadmap · Updates Background Ca

HashRabbit 53 Jan 5, 2023
This is very simple game catch word with JavaScript and Jquery

Catch-Word-js This is very simple game catch word with JavaScript and Jquery install and run guide! download project zip! extract zip file on any dire

Jortsoft 14 Nov 26, 2022
Execute one command (or mount one Node.js middleware) and get an instant high-performance GraphQL API for your PostgreSQL database!

PostGraphile Instant lightning-fast GraphQL API backed primarily by your PostgreSQL database. Highly customisable and extensible thanks to incredibly

Graphile 11.7k Jan 4, 2023
Conjure SQL from GraphQL queries 🧙🔮✨

Sqlmancer Conjure SQL from your GraphQL queries ?? ?? ✨ ⚠️ This project is currently on hiatus. I am hoping to resume working on Sqlmancer once I have

Daniel Rearden 132 Oct 30, 2022
Workshop to illustrate how to use GraphQL

?? Netflix Clone using Astra DB and GraphQL 50 minutes, Intermediate, Start Building A simple ReactJS Netflix homepage clone running on Astra DB that

DataStax Developers 606 Jan 4, 2023
Learn GraphQL PIAIC CNC Class code

GraphQL using React! Steps (for 01 - react-graphql) Generate and copy Access Token from Github Personal Acess Token Create .env file in project folder

Yousuf Qutubuddin 71 Jan 2, 2023