This repository contains a simple coffee shop application demonstrating GraphQL with a .NET backend and a React frontend.
- .NET: Backend is built with .NET.
- HotChocolate: Used as the GraphQL server.
- Entity Framework Core
- SQL Server
- React + TypeScript + Vite: Frontend bootstrapped with the Vite template.
- GraphQL Code Generator: Generates TypeScript types and GraphQL operations.
- Apollo Client: Manages GraphQL queries and caching.
- Chakra UI: Component library for styling.
- Slidev: Used to create presentation slides about the project.
- In the root folder restore dependencies
dotnet restore- Update
appsettings.jsonor project user secrets with your SQL Server connection string - Run the application
dotnet run- The GraphQL playground is available at
http://localhost:5266/graphql/
- Navigate to the frontend folder and install dependencies
cd web
yarn- Start the frontend application
yarn dev- The frontend should be available at
http://localhost:3000
Note
GraphQL Codegen runs as a predev-script so this will throw an error if the backend is not running when starting the frontend application
- Navigate to the
slidevfolder and install dependencies
cd slidev
yarn- To view the slides run
yarn dev