A .NET Core library that integrates Dapper and GraphQL.NET with performance-focused query building and entity mapping.
Dapper.GraphQL is a .NET Core library that integrates Dapper and GraphQL.NET to streamline building GraphQL APIs with SQL databases. It automatically translates GraphQL queries into optimized SQL statements and maps database results to .NET objects, reducing boilerplate and improving performance. The library addresses the challenge of efficiently fetching nested data in GraphQL while maintaining clean separation between query logic and data mapping.
.NET developers building GraphQL APIs that need efficient database access and complex object mapping, particularly those already using or considering Dapper and GraphQL.NET.
Developers choose Dapper.GraphQL because it combines Dapper's performance with GraphQL's flexibility, eliminating manual SQL writing for each GraphQL field. Its query builders and entity mappers reduce development time while ensuring database queries remain optimized.
A .NET Core library designed to integrate the Dapper and graphql-dotnet projects with ease-of-use in mind and performance as the primary concern.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Automatically generates optimized SQL SELECT and JOIN statements based on GraphQL field selection, reducing manual query writing, as shown in the query builder examples.
Uses entity mappers to merge multiple SQL rows into nested .NET objects, efficiently handling one-to-many relationships, demonstrated in the PersonEntityMapper.cs test file.
Supports composable query builders that chain for related entities, enabling complex GraphQL queries to translate into efficient SQL, as illustrated in the PersonQueryBuilder chaining.
Integrates with IServiceCollection for easy dependency injection setup, shown in the ConfigureServices() code snippet, simplifying initialization.
Requires writing and maintaining separate query builders and entity mappers for each entity, increasing boilerplate code and initial setup time.
Lacks built-in support for pagination, as noted in the roadmap, forcing developers to implement it manually.
Being a specialized library, it has fewer community resources and integrations compared to more established GraphQL .NET frameworks like Hot Chocolate.