Ddap.GraphQL 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Ddap.GraphQL --version 1.0.1
                    
NuGet\Install-Package Ddap.GraphQL -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Ddap.GraphQL" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ddap.GraphQL" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Ddap.GraphQL" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Ddap.GraphQL --version 1.0.1
                    
#r "nuget: Ddap.GraphQL, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Ddap.GraphQL@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Ddap.GraphQL&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Ddap.GraphQL&version=1.0.1
                    
Install as a Cake Tool

πŸŽ›οΈ DDAP - Developer in Control

Dynamic Data API Provider. You control everything. We handle the boilerplate.

NuGet License Build

⚑ What is DDAP?

DDAP automatically generates REST, GraphQL, and gRPC APIs from your database schemaβ€”but without forcing any decisions on you.

Unlike other frameworks that lock you into specific libraries, databases, or patterns, DDAP provides infrastructure only. You choose:

  • πŸ—„οΈ Your database (SQL Server, MySQL, PostgreSQL, SQLite, or custom)
  • πŸ”§ Your ORM (Dapper or Entity Framework)
  • 🎨 Your serializer (System.Text.Json, Newtonsoft.Json, or any)
  • 🌐 Your API style (REST, GraphQL, gRPC, or all three)

DDAP discovers your schema, generates base types, and gets out of your way.


🎯 Developer in Control

What DDAP Provides What You Control
βœ… Entity discovery from database 🎯 Database type (SQL Server, MySQL, etc.)
βœ… Metadata mapping (tables, columns, keys) 🎯 ORM choice (Dapper or Entity Framework)
βœ… Base API types (controllers, queries, services) 🎯 Serialization library (any JSON library)
βœ… Auto-Reload infrastructure 🎯 Auto-Reload configuration (when, how)
βœ… Hooks and lifecycle callbacks 🎯 GraphQL configuration (complete control)
βœ… Partial classes for extension 🎯 REST configuration (formatters, routing)
βœ… Project templates (dotnet new) 🎯 gRPC configuration (services, options)
🎯 Everything else!

❌ Other Frameworks vs βœ… DDAP

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  🚫 Opinionated Frameworks          β”‚
β”‚  ❌ Force Newtonsoft.Json           β”‚
β”‚  ❌ Hardcode XML/YAML formatters    β”‚
β”‚  ❌ Database-specific packages      β”‚
β”‚  ❌ Hidden configurations           β”‚
β”‚  ❌ Lock you into patterns          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  βœ… DDAP - Developer in Control     β”‚
β”‚  βœ… You choose serializer           β”‚
β”‚  βœ… You configure formatters        β”‚
β”‚  βœ… Single Dapper, ANY database     β”‚
β”‚  βœ… Everything explicit             β”‚
β”‚  βœ… You own the architecture        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Quick Start

1. Install packages

dotnet add package Ddap.Core
dotnet add package Ddap.Data.Dapper  # OR Ddap.Data.EntityFramework
dotnet add package Ddap.GraphQL      # Optional
dotnet add package Ddap.Rest         # Optional
dotnet add package Ddap.Grpc         # Optional

2. Configure (Dapper example)

using Microsoft.Data.SqlClient;

var builder = WebApplication.CreateBuilder(args);

// YOU choose the database connection
builder.Services.AddDdap()
    .AddDapper(() => new SqlConnection(
        builder.Configuration.GetConnectionString("DefaultConnection")
    ))
    .AddRest()
    .AddGraphQL(graphql =>
    {
        // YOU configure HotChocolate
        graphql
            .AddFiltering()
            .AddSorting()
            .AddProjections();
    });

var app = builder.Build();
app.MapControllers();
app.MapGraphQL();
app.Run();

3. Done! πŸŽ‰

  • REST: GET /api/entity
  • GraphQL: POST /graphql { entities { name } }

OR Use the Template

dotnet new install Ddap.Templates
dotnet new ddap-api --name MyApi
cd MyApi
dotnet run

✨ Features

πŸ—„οΈ Database Agnostic

  • Dapper: Works with ANY IDbConnection (SQL Server, MySQL, PostgreSQL, SQLite, Oracle, etc.)
  • Entity Framework: Use your existing DbContext

🌐 Multi-Protocol APIs

  • REST: Standard HTTP/JSON endpoints with full controller customization
  • GraphQL: Powered by HotChocolate, fully configurable
  • gRPC: High-performance RPC, configurable services

πŸ”„ Auto-Reload System

Automatically reloads database schema after idle periods:

  • βœ… 3 Strategies: InvalidateAndRebuild, HotReloadIncremental, RestartExecutor
  • βœ… 3 Behaviors: ServeOldSchema, BlockRequests, QueueRequests
  • βœ… 3 Detection Methods: AlwaysReload, CheckHash, CheckTimestamps
  • βœ… Lifecycle Hooks: OnBeforeReloadAsync, OnAfterReloadAsync
options.AutoReload = new AutoReloadOptions
{
    Enabled = true,
    IdleTimeout = TimeSpan.FromMinutes(5),
    Strategy = ReloadStrategy.InvalidateAndRebuild,
    Behavior = ReloadBehavior.ServeOldSchema,
    Detection = ChangeDetection.CheckHash
};

πŸ“¦ Project Templates

dotnet new ddap-api --database-provider dapper --database-type mysql --api-providers "rest,graphql"

πŸŽ›οΈ Zero Opinions

  • No forced dependencies
  • No hidden configurations
  • No magic behavior
  • You configure everything

πŸ”§ Fully Extensible

// Extend via partial classes
namespace Ddap.Rest;

public partial class EntityController
{
    [HttpGet("custom")]
    public IActionResult Custom() => Ok("Your endpoint");
}

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚          Your Application                 β”‚
β”‚  (Controllers, Services, Business Logic)  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚        DDAP Core Infrastructure           β”‚
β”‚  βœ… Entity Discovery                      β”‚
β”‚  βœ… Metadata Mapping                      β”‚
β”‚  βœ… Base Type Generation                  β”‚
β”‚  βœ… Auto-Reload Management                β”‚
β”‚  βœ… Lifecycle Hooks                       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚       Your Configuration Choices          β”‚
β”‚  🎯 Database: SQL Server / MySQL / etc.  β”‚
β”‚  🎯 ORM: Dapper / Entity Framework        β”‚
β”‚  🎯 Serializer: System.Text.Json / etc.  β”‚
β”‚  🎯 APIs: REST / GraphQL / gRPC           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“¦ Packages

Package Description Status
Server Packages
Ddap.Core Core abstractions and infrastructure βœ… Stable
Ddap.Data.Dapper Dapper provider (database-agnostic) βœ… Stable
Ddap.Data.EntityFramework Entity Framework Core provider βœ… Stable
Ddap.Rest REST API endpoints βœ… Stable
Ddap.GraphQL GraphQL API (HotChocolate) βœ… Stable
Ddap.Grpc gRPC services βœ… Stable
Ddap.Auth Authentication and authorization βœ… Stable
Ddap.Subscriptions Real-time subscriptions βœ… Stable
Ddap.Aspire .NET Aspire orchestration βœ… Stable
Ddap.Templates Project templates βœ… Stable
Ddap.CodeGen Source generators βœ… Stable
Client Packages
Ddap.Client.Core Core client abstractions βœ… Stable
Ddap.Client.Rest REST client βœ… Stable
Ddap.Client.GraphQL GraphQL client βœ… Stable
Ddap.Client.Grpc gRPC client βœ… Stable

πŸ“š Documentation


🀝 Contributing

Contributions welcome! See CONTRIBUTING.md


πŸ“„ License

MIT License - see LICENSE


⭐ Star History

If DDAP helps you, please star the repo! 🌟


Built with ❀️ by developers who believe in control, not constraints.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Ddap.GraphQL:

Package Downloads
Ddap.Subscriptions

Real-time subscription support for DDAP using SignalR and GraphQL subscriptions for live data updates.

GitHub repositories

This package is not used by any popular GitHub repositories.