An F# implementation of the GraphQL specification, providing a type-safe server and client library for .NET ecosystems.
FSharp.Data.GraphQL is an F# implementation of the GraphQL query language specification. It provides a type-safe, server-side library for building GraphQL APIs and a client-side type provider for executing queries. The project solves the need for a GraphQL solution that integrates seamlessly with F# and .NET ecosystems, offering compile-time validation and functional programming patterns.
F# and .NET developers building GraphQL APIs or clients who value type safety and functional programming idioms. It is particularly suited for teams already invested in the F# ecosystem looking for a GraphQL solution.
Developers choose FSharp.Data.GraphQL for its deep integration with F# type system, providing compile-time safety for GraphQL schemas and queries. Its extensible middleware and support for advanced features like live queries and streaming offer a robust, production-ready alternative to other GraphQL libraries.
FSharp implementation of Facebook GraphQL query language.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Define GraphQL schemas using F# types with compile-time validation, as shown in the PersonType example where invalid fields or return types are caught early.
The redesigned type provider generates F# types from introspection schemas, enabling type-safe queries and mutations with compile-time checks, reducing runtime errors.
Supports intercepting schema compilation, operation planning, and execution phases, allowing for custom logic like query weight analysis or filtering, as demonstrated with built-in middleware.
Integrated support for live queries with configurable subscription providers via the `live` directive, enabling real-time data updates with manual field registration for control.
Configuring live queries requires manually registering each field with identity functions using ILiveFieldSubscription, adding significant boilerplate and complexity.
The library heavily relies on F# and functional programming patterns, which can be a barrier for teams unfamiliar with this ecosystem, limiting adoption in mixed-language environments.
Setting up custom directives like streaming with batching involves boilerplate code, such as defining interval and batch size arguments, as seen in the stream directive example.