GraphQL codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec and API.
This codebase was created to demonstrate a fully fledged fullstack application built with Graphql with Apollo Server including CRUD operations, authentication, routing, pagination, and more.
We've gone to great lengths to adhere to the Graphql with Apollo Server community styleguides & best practices.
For more information on how this works with other frontends/backends, head over to the RealWorld repo.
This repo is under development yet! Contributors are very welcomed!
$ git clone https://github.com/thebergamo/realworld-graphql.git
$ cd realworld-graphql
## Docker Version
### dev version
$ docker-compose up realworld-graphql
### prod version
$ docker-compose up realworld-graphql-prod
## Without Docker
$ yarn
### dev version
$ yarn run dev
### prod version
$ yarn run build && yarn run start
data/schema.graphql
- Is the file that resolves the Graphql schema.src/server.js
- Entry point of the application. This file defines the Hapi.js server and graphql-server-hapi.src/core
- This folder contains all helper files, likesrc/core/config.js
andsrc/core/schema.js
.src/resource
- This folder contains the resources folders. Any resource must auto contain itself.src/resource/resolver.js
- This file must load and merge all the resolver files under the resource folder.src/resource/users
- This file contains theuser
resource and has 2 files insidecontroller.js
that have an abstraction of the user CRUD andresolver.js
.
You can easily checkout the queries for the project using GraphQL IDE, which support import and export your saved queries. All queries supported are stored in a JSON exported file in the directory docs
.