A GraphQL tutorial project built in Node.js. This project was started based on a tutorial on YouTube but has been significantly embellished to demonstrate advanced GraphQL capabilities. The purpose of this app is to showcase my ability to create a GraphQL Node.js application.
This project serves as a demonstration of creating a GraphQL server using Node.js, TypeScript, and Apollo Server. It includes examples of how to define a GraphQL schema, create resolvers, and handle relationships between data entities.
The live demo will be available soon. (Coming later)
To run this project locally, follow these steps:
- Node.js (v14 or later)
- npm (v6 or later)
- TypeScript (v4 or later)
- Clone the repository:
git clone https://github.com/Fast-Dog-Coding/graphql-tutorial.git
cd graphql-tutorial- Install dependencies:
npm install- Compile TypeScript files:
npm run compile- Start the server:
npm startThe GraphQL server will be running at http://localhost:4000.
Once the server is running, you can use the following example queries to test the GraphQL API:
- Get all reviews:
query {
reviews {
id
rating
content
author {
name
}
game {
title
}
}
}- Add a new review:
mutation {
addReview(input: {
rating: 10,
content: "Fantastic game!",
author_id: "1",
game_id: "1"
}) {
id
rating
content
author {
name
}
game {
title
}
}
}- This project is based on the GraphQL Crash Course by NetNinja.
- Additional help and guidance from ChatGPT by OpenAI.
This project is licensed under the ISC License.
Copyright © 2024 Fast Dog Coding