Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# AGENTS.md

GraphZen is a code-first GraphQL SDK for .NET.

## Commands

- **Build:** `dotnet build`
- **Test:** `dotnet test`
- **Filter tests:** `dotnet test --filter "FullyQualifiedName~TestName"`
- **Code gen:** `dotnet run --project src/GraphZen.DevCli/GraphZen.DevCli.csproj gen`

## Architecture

Layered packages, each building on the previous:

1. **Abstractions** - Data annotations for code-first GraphQL development
2. **Infrastructure** - Internal shared utilities
3. **LanguageModel** - GraphQL parser, AST, and printer (uses Superpower)
4. **TypeSystem** - Schema definition and type system object model
5. **QueryEngine** - Query execution engine
6. **AspNetCore.Server** - ASP.NET Core integration for hosting GraphQL APIs

Key patterns:
- `SchemaBuilder` fluent API builds `SchemaDefinition` (mutable) -> `Schema` (immutable)
- Type system uses `I*Definition` / `I*` interface pairs (mutable builder vs immutable runtime)
- AST nodes in `Syntax/` with visitor/walker pattern; T4-generated code (`*.Generated.cs`)
- Tests follow `*.Tests`, `*.IntegrationTests`, `*.FunctionalTests` conventions

## Related Repositories

- **Superpower** (parsing library) - Local clone at `~/Code/datalust/superpower` (upstream: https://github.com/datalust/superpower). Used by `GraphZen.LanguageModel` for GraphQL parsing.

## ReSharper CLI (`dotnet jb`)

Inspection excludes (e.g. `TestResults/`) are configured in `GraphZen.slnx.DotSettings`. Cleanup requires `--exclude` (not supported via `.DotSettings`).

- **Inspect:** `dotnet jb inspectcode GraphZen.slnx -f Text --stdout`
- **Inspect (warnings+):** `dotnet jb inspectcode GraphZen.slnx -e WARNING -f Text --stdout`
- **Inspect single project:** `dotnet jb inspectcode GraphZen.slnx --project "GraphZen.TypeSystem" -f Text --stdout`
- **Cleanup:** `dotnet jb cleanupcode GraphZen.slnx --exclude="**/TestResults/**"`
- **Cleanup scoped:** `dotnet jb cleanupcode GraphZen.slnx --include "src/GraphZen.TypeSystem/**/*.cs"`
- **Reformat only:** `dotnet jb cleanupcode GraphZen.slnx --exclude="**/TestResults/**" --profile "Built-in: Reformat Code"`

## Code Style

Nullable enabled, warnings as errors, latest C# language version.

## Related Repositories

- **Superpower** (parsing library): `~/Code/datalust/superpower` | [github.com/datalust/superpower](https://github.com/datalust/superpower)
- **graphql-spec** (GraphQL specification): `~/Code/graphql/graphql-spec` | [github.com/graphql/graphql-spec](https://github.com/graphql/graphql-spec)
- **graphql-js** (reference implementation): `~/Code/graphql/graphql-js` | [github.com/graphql/graphql-js](https://github.com/graphql/graphql-js)
- **graphiql** (in-browser GraphQL IDE): `~/Code/graphql/graphiql` | [github.com/graphql/graphiql](https://github.com/graphql/graphiql)
- **dataloader** (batching/caching utility): `~/Code/graphql/dataloader` | [github.com/graphql/dataloader](https://github.com/graphql/dataloader)
- **foundation** (GraphQL Foundation): `~/Code/graphql/foundation` | [github.com/graphql/foundation](https://github.com/graphql/foundation)
55 changes: 0 additions & 55 deletions CLAUDE.md

This file was deleted.

1 change: 1 addition & 0 deletions CLAUDE.md
1 change: 1 addition & 0 deletions GraphZen.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<Project Path="test/GraphZen.LanguageModel.Tests/GraphZen.LanguageModel.Tests.csproj" />
<Project Path="test/GraphZen.QueryEngine.FunctionalTests/GraphZen.QueryEngine.FunctionalTests.csproj" />
<Project Path="test/GraphZen.QueryEngine.Tests/GraphZen.QueryEngine.Tests.csproj" />
<Project Path="test/GraphZen.SpecConformance.Tests/GraphZen.SpecConformance.Tests.csproj" />
<Project Path="test/GraphZen.Tests/GraphZen.Tests.csproj" />
<Project Path="test/GraphZen.TypeSystem.FunctionalTests/GraphZen.TypeSystem.FunctionalTests.csproj" />
<Project Path="test/GraphZen.TypeSystem.Tests/GraphZen.TypeSystem.Tests.csproj" />
Expand Down
Loading
Loading