# chillicream/graphql-platform architecture

> Architecture diagram of the GitHub repository chillicream/graphql-platform, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/chillicream/graphql-platform
- Repository: https://github.com/chillicream/graphql-platform

## Overview

This repository is a multi-product .NET GraphQL platform. Its central documented workflow is a client request handled by Hot Chocolate, with data shaping and paging applied to queryable sources; GreenDonut provides batching and caching for resolver data access. The tree also shows MCP and OpenAPI adapters and CookieCrumble snapshot-testing support. Some subsystems are represented only by paths, so their internal wiring is omitted rather than inferred.

Main entry points: [`src/HotChocolate/Core`](https://github.com/chillicream/graphql-platform/tree/main/src/HotChocolate/Core) (Hot Chocolate), [`src/HotChocolate/Data/src/Data/Filters/Expressions/Handlers/QueryableDefaultFieldHandler.cs`](https://github.com/chillicream/graphql-platform/blob/main/src/HotChocolate/Data/src/Data/Filters/Expressions/Handlers/QueryableDefaultFieldHandler.cs) (Queryable filters), [`src/HotChocolate/Data/src/Data/Sorting/Expressions/Handlers/QueryableDefaultSortFieldHandler.cs`](https://github.com/chillicream/graphql-platform/blob/main/src/HotChocolate/Data/src/Data/Sorting/Expressions/Handlers/QueryableDefaultSortFieldHandler.cs) (Queryable sorting), [`src/HotChocolate/Data/src/Data/Projections/Expressions/Handlers/QueryableProjectionScalarHandler.cs`](https://github.com/chillicream/graphql-platform/blob/main/src/HotChocolate/Data/src/Data/Projections/Expressions/Handlers/QueryableProjectionScalarHandler.cs) (Queryable projections)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_graphql["GraphQL server"]
  node_server["Hot Chocolate"]
  node_filters["Queryable filters"]
  node_sorting["Queryable sorting"]
  node_projections["Queryable projections"]
  node_cursor["Cursor paging"]
  node_offset["Offset paging"]
  node_efcursor["EF cursor paging"]
end

subgraph group_data["Data access"]
  node_queryable["Queryable source"]
  node_dataloader["GreenDonut loaders<br/>[BatchDataLoader.cs]"]
  node_loaderapi["Loader contracts<br/>[IDataLoader.cs]"]
  node_queryloader["Query data loaders<br/>[QueryDataLoader.cs]"]
end

subgraph group_adapters["API adapters"]
  node_mcp["MCP adapter<br/>[CallToolHandler.cs]"]
  node_openapi["OpenAPI adapter"]
end

subgraph group_testing["Snapshot testing"]
  node_snapshots["Snapshot engine<br/>[Snapshot.cs]"]
  node_formatters["Value formatters"]
  node_testframework["Test framework hooks"]
end

node_client(("API client"))

node_client -->|"sends request"| node_server
node_server -->|"builds filters"| node_filters
node_server -->|"builds sorting"| node_sorting
node_server -->|"builds projections"| node_projections
node_server -->|"dispatches paging"| node_cursor
node_server -->|"dispatches paging"| node_offset
node_server -->|"resolver fetches"| node_dataloader
node_filters -->|"filters query"| node_queryable
node_sorting -->|"sorts query"| node_queryable
node_projections -->|"projects query"| node_queryable
node_cursor -->|"slices query"| node_queryable
node_offset -->|"pages query"| node_queryable
node_efcursor -->|"slices EF query"| node_queryable
node_dataloader -->|"implements contract"| node_loaderapi
node_queryloader -->|"queries source"| node_queryable
node_server -.->|"exposes operations"| node_mcp
node_server -.->|"serves endpoints"| node_openapi
node_testframework -->|"supports snapshots"| node_snapshots
node_snapshots -->|"formats values"| node_formatters

click node_server "https://github.com/chillicream/graphql-platform/tree/main/src/HotChocolate/Core"
click node_filters "https://github.com/chillicream/graphql-platform/blob/main/src/HotChocolate/Data/src/Data/Filters/Expressions/Handlers/QueryableDefaultFieldHandler.cs"
click node_sorting "https://github.com/chillicream/graphql-platform/blob/main/src/HotChocolate/Data/src/Data/Sorting/Expressions/Handlers/QueryableDefaultSortFieldHandler.cs"
click node_projections "https://github.com/chillicream/graphql-platform/blob/main/src/HotChocolate/Data/src/Data/Projections/Expressions/Handlers/QueryableProjectionScalarHandler.cs"
click node_cursor "https://github.com/chillicream/graphql-platform/blob/main/src/HotChocolate/Core/src/Types.CursorPagination/QueryableCursorPagingHandler.cs"
click node_offset "https://github.com/chillicream/graphql-platform/blob/main/src/HotChocolate/Core/src/Types.OffsetPagination/QueryableOffsetPagingHandler.cs"
click node_efcursor "https://github.com/chillicream/graphql-platform/blob/main/src/HotChocolate/Data/src/EntityFramework/Pagination/EfQueryableCursorPagingHandler.cs"
click node_dataloader "https://github.com/chillicream/graphql-platform/blob/main/src/GreenDonut/src/GreenDonut/BatchDataLoader.cs"
click node_loaderapi "https://github.com/chillicream/graphql-platform/blob/main/src/GreenDonut/src/GreenDonut.Abstractions/IDataLoader.cs"
click node_queryloader "https://github.com/chillicream/graphql-platform/blob/main/src/GreenDonut/src/GreenDonut.Data/Internal/QueryDataLoader.cs"
click node_mcp "https://github.com/chillicream/graphql-platform/blob/main/src/HotChocolate/Adapters/src/Adapters.Mcp.Core/Handlers/CallToolHandler.cs"
click node_openapi "https://github.com/chillicream/graphql-platform/blob/main/src/HotChocolate/Adapters/src/Adapters.OpenApi.Core/Execution/DynamicEndpointMiddleware.cs"
click node_snapshots "https://github.com/chillicream/graphql-platform/blob/main/src/CookieCrumble/src/CookieCrumble/Snapshot.cs"
click node_formatters "https://github.com/chillicream/graphql-platform/blob/main/src/CookieCrumble/src/CookieCrumble/Formatters/SnapshotValueFormatters.cs"
click node_testframework "https://github.com/chillicream/graphql-platform/blob/main/src/CookieCrumble/src/CookieCrumble.Xunit/CookieCrumbleXunit.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_server,node_filters,node_sorting,node_projections,node_cursor,node_offset,node_efcursor,node_client toneBlue
class node_queryable,node_dataloader,node_loaderapi,node_queryloader toneAmber
class node_mcp,node_openapi toneMint
class node_snapshots,node_formatters,node_testframework toneRose
```

## Components

### GraphQL server

- [Hot Chocolate](https://github.com/chillicream/graphql-platform/tree/main/src/HotChocolate/Core): `src/HotChocolate/Core`
- [Queryable filters](https://github.com/chillicream/graphql-platform/blob/main/src/HotChocolate/Data/src/Data/Filters/Expressions/Handlers/QueryableDefaultFieldHandler.cs): `src/HotChocolate/Data/src/Data/Filters/Expressions/Handlers/QueryableDefaultFieldHandler.cs`
- [Queryable sorting](https://github.com/chillicream/graphql-platform/blob/main/src/HotChocolate/Data/src/Data/Sorting/Expressions/Handlers/QueryableDefaultSortFieldHandler.cs): `src/HotChocolate/Data/src/Data/Sorting/Expressions/Handlers/QueryableDefaultSortFieldHandler.cs`
- [Queryable projections](https://github.com/chillicream/graphql-platform/blob/main/src/HotChocolate/Data/src/Data/Projections/Expressions/Handlers/QueryableProjectionScalarHandler.cs): `src/HotChocolate/Data/src/Data/Projections/Expressions/Handlers/QueryableProjectionScalarHandler.cs`
- [Cursor paging](https://github.com/chillicream/graphql-platform/blob/main/src/HotChocolate/Core/src/Types.CursorPagination/QueryableCursorPagingHandler.cs): `src/HotChocolate/Core/src/Types.CursorPagination/QueryableCursorPagingHandler.cs`
- [Offset paging](https://github.com/chillicream/graphql-platform/blob/main/src/HotChocolate/Core/src/Types.OffsetPagination/QueryableOffsetPagingHandler.cs): `src/HotChocolate/Core/src/Types.OffsetPagination/QueryableOffsetPagingHandler.cs`
- [EF cursor paging](https://github.com/chillicream/graphql-platform/blob/main/src/HotChocolate/Data/src/EntityFramework/Pagination/EfQueryableCursorPagingHandler.cs): `src/HotChocolate/Data/src/EntityFramework/Pagination/EfQueryableCursorPagingHandler.cs`

### Data access

- **Queryable source**
- [GreenDonut loaders](https://github.com/chillicream/graphql-platform/blob/main/src/GreenDonut/src/GreenDonut/BatchDataLoader.cs): `src/GreenDonut/src/GreenDonut/BatchDataLoader.cs`
- [Loader contracts](https://github.com/chillicream/graphql-platform/blob/main/src/GreenDonut/src/GreenDonut.Abstractions/IDataLoader.cs): `src/GreenDonut/src/GreenDonut.Abstractions/IDataLoader.cs`
- [Query data loaders](https://github.com/chillicream/graphql-platform/blob/main/src/GreenDonut/src/GreenDonut.Data/Internal/QueryDataLoader.cs): `src/GreenDonut/src/GreenDonut.Data/Internal/QueryDataLoader.cs`

### API adapters

- [MCP adapter](https://github.com/chillicream/graphql-platform/blob/main/src/HotChocolate/Adapters/src/Adapters.Mcp.Core/Handlers/CallToolHandler.cs): `src/HotChocolate/Adapters/src/Adapters.Mcp.Core/Handlers/CallToolHandler.cs`
- [OpenAPI adapter](https://github.com/chillicream/graphql-platform/blob/main/src/HotChocolate/Adapters/src/Adapters.OpenApi.Core/Execution/DynamicEndpointMiddleware.cs): `src/HotChocolate/Adapters/src/Adapters.OpenApi.Core/Execution/DynamicEndpointMiddleware.cs`

### Snapshot testing

- [Snapshot engine](https://github.com/chillicream/graphql-platform/blob/main/src/CookieCrumble/src/CookieCrumble/Snapshot.cs): `src/CookieCrumble/src/CookieCrumble/Snapshot.cs`
- [Value formatters](https://github.com/chillicream/graphql-platform/blob/main/src/CookieCrumble/src/CookieCrumble/Formatters/SnapshotValueFormatters.cs): `src/CookieCrumble/src/CookieCrumble/Formatters/SnapshotValueFormatters.cs`
- [Test framework hooks](https://github.com/chillicream/graphql-platform/blob/main/src/CookieCrumble/src/CookieCrumble.Xunit/CookieCrumbleXunit.cs): `src/CookieCrumble/src/CookieCrumble.Xunit/CookieCrumbleXunit.cs`

### Other components

- **API client**

## Connections

- API client → Hot Chocolate: sends request
- Hot Chocolate → Queryable filters: builds filters
- Hot Chocolate → Queryable sorting: builds sorting
- Hot Chocolate → Queryable projections: builds projections
- Hot Chocolate → Cursor paging: dispatches paging
- Hot Chocolate → Offset paging: dispatches paging
- Hot Chocolate → GreenDonut loaders: resolver fetches
- Queryable filters → Queryable source: filters query
- Queryable sorting → Queryable source: sorts query
- Queryable projections → Queryable source: projects query
- Cursor paging → Queryable source: slices query
- Offset paging → Queryable source: pages query
- EF cursor paging → Queryable source: slices EF query
- GreenDonut loaders → Loader contracts: implements contract
- Query data loaders → Queryable source: queries source
- Hot Chocolate → MCP adapter: exposes operations
- Hot Chocolate → OpenAPI adapter: serves endpoints
- Test framework hooks → Snapshot engine: supports snapshots
- Snapshot engine → Value formatters: formats values
