This demonstration presents a simple movie catalog with a GraphQL-based API.
This demo uses the following technologies:
- Docker & Docker Compose
- SQL Server on Linux
- .NET Core 6.0
- ASP.NET Core Web API
- Hot Chocolate GraphQL framework
- Entity Framework Core (with Migrations and Compiled Models)
- MediatR
- FluentValidations
To run the application, the following prerequirements should be met:
- Docker Desktop (or a Linux equivalent with Docker host, client and Docker Compose plugin)
- .NET Core SDK 6.0 or later
- Entity Framework Core .NET Command-line Tools (link)
- ASP.NET Core runtime 6.0
- Visual Studio Code
- cUrl (or an equivalent tool)
After installing the prerequirements, follow these instructions:
- Checkout the source
- Open the folder in VS Code
- Install the recommended extensions
- Open a shell prompt, and issue
docker compose --project-directory "src" up -d
- The application auto-creates the database if it doesn't exist yet
- (If on Linux) Make the
deploy/deployInitialData.sh
executable, and issue./deploy/deployInitialData.sh
- (If on Windows) Import the collection from
deploy/Postman_collection.json
, and use the "Upload initial data" request to senddeploy/movies-compact.json
to the server - Open a browser window, navigate to
localhost:32741
and start running GraphQL queries (filters & sorting also supported) - Issue
docker compose --project-directory "src" stop
to stop the containers
Filtering movies by genre during a query does not work. There's likely something wrong in the value comparer implementation, and likely a different kind of persistence mechanism is required in order for it to work correctly.
Validation errors trapped by FluentValidation do not appear in the console output.