Agent Tests for API, MAUI, and Slop Features

This commit is contained in:
2026-06-03 19:08:35 -04:00
parent 46150d3a69
commit 0feac0f0a0
142 changed files with 4156 additions and 1462 deletions
+32
View File
@@ -0,0 +1,32 @@
using API.GraphQL.Types;
using Model.Entity.Data;
var builder = WebApplication.CreateBuilder(args);
builder.Services
.AddGraphQLServer()
.AddQueryType(d =>
{
d.Name("Query");
d.Field("entities")
.Type<NonNullType<ListType<NonNullType<EntityGraphType>>>>()
.Resolve(ctx => EntityData.Get().Values.ToList());
d.Field("entity")
.Type<EntityGraphType>()
.Argument("id", a => a.Type<NonNullType<StringType>>())
.Resolve(ctx =>
{
var id = ctx.ArgumentValue<string>("id");
EntityData.Get().TryGetValue(id, out var entity);
return entity;
});
})
.AddType<EntityGraphType>();
var app = builder.Build();
app.MapGraphQL();
app.Run();