https://github.com/jagoda11/apollo-graphtv-server
π A dynamic GraphQL Apollo Server in Node.js & TypeScript for querying and managing mock TV shows data. Explore, query, and interact with TV show information through a playful GraphQL interface. πΊ
https://github.com/jagoda11/apollo-graphtv-server
List: apollo-graphtv-server
api-development apollo-server-4 awesome-list backend ci-cd data-querying debricked express graphql graphql-playground graphql-request jest learning-graphql mock-api nodejs typescipt typescript
Last synced: 16 days ago
JSON representation
π A dynamic GraphQL Apollo Server in Node.js & TypeScript for querying and managing mock TV shows data. Explore, query, and interact with TV show information through a playful GraphQL interface. πΊ
- Host: GitHub
- URL: https://github.com/jagoda11/apollo-graphtv-server
- Owner: Jagoda11
- License: mit
- Created: 2024-02-09T19:59:12.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-05T21:24:44.000Z (over 1 year ago)
- Last Synced: 2025-02-16T15:05:21.950Z (about 1 year ago)
- Topics: api-development, apollo-server-4, awesome-list, backend, ci-cd, data-querying, debricked, express, graphql, graphql-playground, graphql-request, jest, learning-graphql, mock-api, nodejs, typescipt, typescript
- Language: TypeScript
- Homepage:
- Size: 26.8 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Apollo GraphTV Serverπ





Welcome to My GraphQL Apollo Server! This project is a simple yet powerful GraphQL server built with Apollo Server, Node.js, and TypeScript. It serves as a mock API for managing TV shows data, allowing users to query information about various TV shows.
## Features π
- Provides a GraphQL API for querying TV show data πΊ
- Mocks data for TV shows, including titles, IDs, and number of seasons π
- Supports queries to retrieve all TV shows or specific TV shows by ID π
## How to Use π
1. Clone the repository to your local machine. π¨βπ»
2. Install dependencies using `npm install`. π¦
3. Start the server using `npm start`. π¬
4. Visit `http://localhost:4000` in your browser to access the GraphQL Playground. π
5. Use GraphQL queries to interact with the API and retrieve TV show data. π¬
## Sample Queries π
### Get All TV Shows
```graphql
query {
tvShows {
id
title
seasons
}
}
```
## Contributing π€
Contributions are welcome! If you'd like to contribute to this project, please see the contribution guidelines
for more information.
## License π
Just like how Pooh Bear shares his honey with his friends, this project is shared under the MIT License. π―π»
## Continuous Integration and Dependency Management βοΈ
This project includes two GitHub Actions workflows to ensure code quality and maintain up-to-date dependencies:
### Node.js CI π
This workflow runs automatically on every push to the `main` branch and on pull requests. It performs the following tasks:
- **Builds the project** to ensure there are no build errors.
- **Runs tests with coverage** to ensure the codebase remains functional and that test coverage is maintained.
### Dependency Update and Vulnerability Scan π‘οΈ
This workflow is scheduled to run daily and can also be triggered manually. It performs the following tasks:
- **Updates all npm dependencies** to their latest versions.
- **Performs a vulnerability scan** using Debricked to ensure that updated dependencies do not introduce security vulnerabilities.
- **Commits and pushes any changes** if dependencies are updated successfully.
These workflows help maintain the health and security of the project, ensuring it remains robust and up-to-date.
---
I included this section to provide a playful analogy that illustrates how our GraphQL server operates using the familiar concept of a vending machine. By comparing technical concepts to everyday experiences, we aim to make our project more approachable and enjoyable for everyone.
## How it Works: A Playground and a Magical Vending Machineπ
### The Vending Machine (Server)π§
Imagine your GraphQL server as a magical vending machine in a playground. It's a special machine that can give you toys, snacks, or anything you ask for!
### The Buttons (Queries and Mutations)π
On the vending machine, there are colorful buttons with pictures and words. These buttons let you choose what you want from the machine. Pressing a button is like making a query or mutation in GraphQL. You're asking the machine for something specific, like "Give me a toy" or "Change the song."
### The Toy Dispenser (Resolvers) π§Έ
Inside the vending machine, there are tiny helpers called "Toy Dispensers." Each Toy Dispenser knows how to get a different toy from the magical toy room. When you press a button, the Toy Dispenser gets the toy you asked for and gives it to you. These Toy Dispensers are like resolvers in GraphQL. They know how to find and give you the right information based on your request.
### The Playground (Client)π
You're the kid playing in the playground. When you want something from the vending machine, you walk up to it and press a button. The vending machine (server) listens to you and gives you what you asked for.
### The Magic (GraphQL)β¨
The magic in the playground is GraphQL! It helps you talk to the vending machine (server) and get what you want easily. You just need to press the right buttons, and the machine knows exactly what to do.
So, just like playing in the playground with a magical vending machine, using GraphQL is like having a fun and easy way to ask for things and get them quickly!