A simple GraphQL api server using Apollo. In this project, we will define simple CRUD operations on a mongo DB database with mongoose.
The project is a decoupled structure of microservices using RabitMQ.
The project is setup in a module structure where every Module has it's own GraphQL schema, queries, resolvers, types, dat. This makes it easy to seperate logic. Inside app/index.ts we read all Schema.graphql and Resolvers.ts from all modules. In this case, app/Person is a module of it's own.

- Create a new folder inside app folder
- Add
Schema.graphqlwhich will hold the module graphQL schema - Add
Resolvers.tswhich will have all your queries and mutation resolvers - You can add optional files like
types.d.tsfor all your module typescript definitions and Database connection files or controllers.
- Setup RabitMQ locally or use an online version
- Clone the repo
- Run
yarnornpm installto install project dependencies - The app will be served on a GraphQL server using
Apollo, the library generates a “frontend” which looks like so:
I am a full stack Javascript developer with over 6 years enjoying shipping Javascript projects.