Reputation: 367
I found GraphQL as an enticing option to decouple front-end development from APIs (potentially a great fit for our company, which does lots of API customization for each customer). However, I can't quite work out if it's ready for a .NET development environment, or whether it's still considered an early technology? I also can't tell if it has bigger problems under the covers (e.g. N+1 issue). Any experience and guidance for GraphQL with a .NET implementation?
Upvotes: 16
Views: 3472
Reputation: 922
Today, in 2025, I would definitely go for ChilliCream, HotChocolate and Fusion. These are mature libraries and tools.
Upvotes: -1
Reputation: 93
Let's first understand - Why GraphQL was at all needed as we already had REST APIs working fine?
Definition: "GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data." It solves the problem of under fetching and over fetching issue while making API. It also makes single query endpoint whereas REST can have multiple query endpoints.
In .NET environment, we can use hotchocolate nuget package to implement graphQL, I have been working with a backend that implements the following tech stack
Experience with GraphQL was really good as I can make a single API and use it more than once by altering my queries. Generic programming comes into play if you know how to do, it can save you a lot of time.
With your situation, You can use GraphQL as your different customer might have different demands from your APIs and it will be a great fit.
Cons - Once you get struck or if there is an exception, there are very less sources to help you out and you will be having trouble to find quick solution. You have to figure your solution most of the time as this tech is new in the .NET ecosystem.
Upvotes: 0
Reputation: 688
It's now 2019, I stumbled upon this question and I thought I'd share this cool GraphQL library for .NET
https://github.com/graphql-dotnet/graphql-dotnet
Don't forget to dotnet add package GraphQL.Server.Ui.Playground
to get the very sweet ui playground:
Upvotes: 3
Reputation: 922
The fact that there is no answer here after one month should tell it's tale.
I have shifted my focus from .NET Framework to .NET Core and after trying out the .NET libraries available, I soon went for an API gateway built on TypeScript and the more mature Facebook supported GraphQL implementation.
With the server issue solved, my combined .NET Framework/Core based client easily communicates with the API gateway. As the gateway itself is rather lightweight, exchanging this for a more solid .NET Core implementation later will be easy.
Upvotes: 11