Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comparison with GraphQL.NET #336

Open
cmeeren opened this issue May 7, 2021 · 8 comments
Open

Comparison with GraphQL.NET #336

cmeeren opened this issue May 7, 2021 · 8 comments

Comments

@cmeeren
Copy link

cmeeren commented May 7, 2021

Currently checking out if GraphQL is a good fit for us. Have no prior experience.

Using F#, so of course FSharp.Data.GraphQL gets bonus points for being focused on F#. But I also see that GraphQL.NET seems more popular (not surprising since it's C#), more feature-rich (e.g. has built-in support for sandboxes like GraphiQL), in some ways more convenient (supports other useful scalar types out of the box), and due to its popularity generally seems like a "safer" choice.

Do you (or anyone else) have any experience with both FSharp.Data.GraphQL and GraphQL.NET and can point to some important differences?

One thing I'm concerned about is performance. If FSharp.Data.GraphQL uses async for all fields etc. internally, performance could be significantly worse. (I had that problem with Felicity, and got an order-of-magnitude improvement after i changed to Hopac internally).

@nightroman
Copy link

@cmeeren I am not answering the exact question but I would add HotChocolate to the equation, especially if performance is important. It's a very powerful tool with both server and client support, plus browser IDE (Banana Cake Pop, comes out of the box with server). Feature rich, actively developed and supported.

They are not focused on F# but they start talking about improving support/design for F#, too. Yet development in F# is possible indeed. Some server sample project (not theirs) -- https://github.com/adelarsq/hotchocolate_fsharp_sample

All in all, having evaluated GraphQL.NET and HotChocolate, we went with HotChocolate and we are happy.
I personally value FSharp.Data.GraphQL for ad-hoc client scripting, with F# unique data provider features.

@knocte
Copy link

knocte commented Feb 1, 2022

Hey guys, I find myself in the same situation now as @cmeeren when he opened his issue. About half a year later, maybe any of you can share any lessons learned so far? I'd love to choose the best option here among the three options HotChocolate/FSharp.Data.GraphQL/graphql-dotnet. Thanks in advance.

@xperiandri
Copy link
Collaborator

As I understand HotChocolate has quite good support and evolved well.
However, it is completely object-oriented. So that if you look at the functional approach it is not for you.

Banana Cake Pop should be language agnostic on .NET. But I have not tried yet.

In general, I have a standard project template that I use. I've already incorporated #332 and I created #324.
I hope that with @nikhedonia and @mickhansen we will merge that stuff soon and prepare solution templates for ASP.NET Core and Azure Functions that will also contain Banana Cake Pop

They are not focused on F# but they start talking about improving support/design for F#, too. Yet development in F# is possible indeed. Some server sample project (not theirs) -- https://github.com/adelarsq/hotchocolate_fsharp_sample

I've reviewed it but comparing to this implementation it not so good for F# developers.

One thing I'm concerned about is performance. If FSharp.Data.GraphQL uses async for all fields etc. internally, performance could be significantly worse. (I had that problem with Felicity, and got an order-of-magnitude improvement after i changed to Hopac internally).

I think we need to rethink this approach. At least to use asyncResult

@xperiandri
Copy link
Collaborator

@cmeeren v2 was released with a lot of cool features. The sample includes the use of Banana Cake Pop

@cmeeren
Copy link
Author

cmeeren commented Apr 5, 2024

Congratulations! Happy to hear it. F# needs a solid GraphQL library.

As for me, I'm now using HotChocolate, which seems sufficiently far ahead of FSharp.Data.GraphQL in terms of functionality and active development that I would rather use that and put up with its friction with F#. YMMV, of course.

@njlr
Copy link
Contributor

njlr commented Apr 5, 2024

The blessing and curse of F# - you get to choose between an FP library with a small community or an OOP library with a large community!

@valbers
Copy link
Collaborator

valbers commented Apr 5, 2024

FSharp.Data.GraphQL is better, though 🙂. I chose it over HotChocolate because I was so much faster getting a GraphQL service up and running with it than with HotChocolate. With the latter, I had to go through an extensive documentation which shows how to do X, Y and Z in a hundred different ways with hundred different defaults and this and that...
Less (meaning straightforward) is often more.

@cmeeren
Copy link
Author

cmeeren commented Apr 5, 2024

I can take another look. If FSharp:Data.GraphQL could support SSE (Server-Sent Events), I'd be one step closer to choosing it. And #460 would help, too!

In any case, this API is intended to live for decades, so a big and active community/userbase is a big plus for us. Getting up and running quickly is not a primary concern.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants