A .NET library that automatically generates GraphQL schemas from your existing .NET classes and methods.
GraphQL Conventions is a .NET library that automatically generates GraphQL schemas from existing .NET classes and methods. It builds on top of GraphQL .NET to reduce boilerplate by using property getters and methods as field resolvers, simplifying the process of exposing .NET APIs via GraphQL.
.NET developers building GraphQL APIs who want to minimize schema definition boilerplate and leverage their existing .NET class structures.
It offers a convention-based approach that eliminates manual schema wiring, integrates seamlessly with GraphQL .NET, and provides built-in support for features like pagination, unique IDs, and dependency injection.
GraphQL Conventions Library for .NET
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
It automatically wraps .NET classes and methods into GraphQL schema definitions, reducing boilerplate significantly, as shown in the getting started example where property getters and methods define fields.
Provides Connection<T> and Cursor types for implementing cursor-based pagination, simplifying query design, as demonstrated in the Search method with after and first parameters.
Uses attributes like [Description] and NonNull<T> to add documentation and enforce non-nullable fields directly in code, enhancing schema clarity and type safety.
Supports dependency injection through WithDependencyInjector in the executor, allowing resolvers to access services seamlessly, as shown in the setup example.
As a complementary layer, it requires prior setup and knowledge of GraphQL .NET, adding complexity and an extra dependency for teams not already using it.
Key GraphQL features like subscriptions or custom directives are not emphasized in the README, potentially requiring manual implementation or lacking support.
The README points to unit tests for detailed examples, which may be insufficient for production scenarios, lacking comprehensive guides or troubleshooting resources.
The convention-over-configuration approach might not accommodate highly custom or non-standard schema requirements, forcing developers to work around limitations.