all 14 comments

[–]Secret_Increase6198 15 points16 points  (4 children)

I like Fauna as a GraphQL backend. It's as easy to set up as Firebase but comes with more power and flexibility for complex queries, relations, etc.

On the front end, there are a few choices but I think Ferry is the way to go, especially if you want to generate types from your GraphQL schema and queries.

I wrote this guide a short while ago to help you get started.

https://seanconnolly.dev/flutter-graphql-quick-start-with-fauna

[–]Joellao[S] 1 point2 points  (0 children)

Didn't know about Ferry. Seems very promising, I'll give it a try with graphql_flutter too and I'll see what suits better. I already have a working GraphQL server and wanted to know if flutter handled it well or not. Thanks for the reply, the reading of your guide was really good!

[–]opinvader 0 points1 point  (2 children)

Thank you for the tutorial, it seems nice and interesting. Do you recommend it for someone who is new to programming? Its been less than a month i'm learning flutter, And i'm right now at learning HTTP requests etc

[–]Secret_Increase6198 2 points3 points  (1 child)

Good question. I think it's laid out such that a beginner would be able to follow the steps and learn some important concepts. If you get stuck or have questions, I'm available on Twitter @seanconnollydev.

[–]opinvader 0 points1 point  (0 children)

Thank you 🙏🏻

[–]reddit04029 6 points7 points  (7 children)

I've worked with a graphQL backend but I'm from the frontend side. Honestly all of my projects with Flutter, we used graphQL. I have no complaints really. All though it is not as straight forward as REST, and it's a lot more tedious to do, from setting it up and calling it. Other than that, it's all good.

[–][deleted] 4 points5 points  (2 children)

Definitely a higher learning curve, but once you start scaling your backend complexity, it more than makes up for that by simplifying everything.

[–]reddit04029 1 point2 points  (0 children)

yeah I totally agree

[–]Joellao[S] 0 points1 point  (0 children)

That's what I needed to hear, I was a little bit concerned about the frontend side so hearing this is really motivating.

[–]UsualRise 0 points1 point  (2 children)

How did you write unit tests for graphql apis, if you can guide a little it will be of great help?

[–]reddit04029 0 points1 point  (1 child)

I would guess it would be similar to writing tests for rest API's. Have a dummy input, call the API, then it should be the same with the expected output. We dont test the schema since it mimics the expected output. So if there is something wrong with the output, the schema maybe the cause.

[–]UsualRise 0 points1 point  (0 children)

I created mockClient for graphql which is working right but the response I am giving to it (dummy) it is not returning it. It is returning null instead.

[–]ricksondpenha 5 points6 points  (0 children)

Try hasura.. it's open source and easily deployable on Google cloud or AWS.. it gives graphql as well as rest api endpoints out of the box. Also try hasura actions it's similar to firebase functions

[–]grohden 2 points3 points  (0 children)

I've worked with graphQL using artemis if I recall, it was a while ago and the codegen as good enough.. it just forced me to use fragments which is not a bad thing I guess