apollographql / apollo-feature-requests

🧑‍🚀 Apollo Client Feature Requests | (no 🐛 please).
Other
130 stars 7 forks source link

Apollo Client for Flutter #290

Open daniarmas opened 3 years ago

daniarmas commented 3 years ago

Currently Apollo doesn't offer an official Flutter Client for developers using Flutter as their mobile Development framework

medz commented 2 years ago

Apollo GraphQL launches Flutter client is a very good choice, the current third-party GraphQL implementation on pub.dev is very bad!

jpvajda commented 2 years ago

https://pub.dev/packages/graphql_flutter

medz commented 2 years ago

https://pub.dev/packages/graphql_flutter

Implementation is not good

jpvajda commented 2 years ago

Just adding that I had a chat this week with a current Apollo Server user that expressed interest in a better Flutter GraphQL Client than what is currently available, as they use Flutter for their mobile apps.

jpvajda commented 2 years ago

For Flutter Developers looking for a GraphQL Codegen solution for Dart, this was recommended by an Apollo User.

https://github.com/heftapp/graphql_codegen

Some other Dart/Flutter libraries I've come across, courtesy of @martinbonnin 🥂

https://ferrygraphql.com/ https://github.com/comigor/artemis

megamaddu commented 1 year ago

@medz not good how? Starting to look into this as well so I'm curious how you'd compare the three existing options. Plus that feedback might help direct future work whether or not it's from Apollo.

medz commented 1 year ago

@medz not good how? Starting to look into this as well so I'm curious how you'd compare the three existing options. Plus that feedback might help direct future work whether or not it's from Apollo.

It's been a long time since my last reply. These two packages have developed well during this time. But other packages than ferry have a rough implementation!

Let me put it another way, the current front-end GraphQL client is not the best implementation. Still at the stage of writing SDL.

Maybe I won't use any GraphQL front-end packages anymore because I've switched to gRPC. Using protobuffer for gRPC makes it a lot of fun for me to work with backend APIs on post development.

Perhaps what is missing from the front end is a toolkit with CRUD or generating services from GraphQL SDL, although I have plans to make it, but I'm not sure if I want to develop it. Because I've tried my best not to use GraphQL, which makes back-end development a joy, but using it on the front-end is a pain for our app and web developers.

The above is just my personal opinion, if you don't like it, don't spray it.

megamaddu commented 1 year ago

Thanks!

I'm curious what you're referring to here:

current front-end GraphQL client is not the best implementation. Still at the stage of writing SDL.

medz commented 1 year ago

@megamaddu I'm curious what you're referring to here:

current front-end GraphQL client is not the best implementation. Still at the stage of writing SDL.

Write a .graphql query statement file with no type guidance and no security testing, mainly when the server has developed a complete GraphQL SDL (schema.graphql) for the client, and most clients need to follow the schema.graphql Write your own query and generate code.

Perhaps this is how the query is written for the minimal query implementation, but it's not type-safe. Because developers still write the wrong query by mistake.

I have an idea, why not use schema.graphql to generate a builders and then generate SDL with the parameters passed by the developer to send to the server? You only need to reverse the steps of using GraphQL on the current front end to achieve type-safe, query-robust SDL.

I have been thinking about this idea for a long time, maybe I will try it in the near future (CRUD inspiration from Prisma ORM)

Also, as a front-end developer, I hate writing SDL and then generating code. In back-end development, we have first-code. In fact, the front-end really hopes to have this feature, at least to make it less painful for us front-end developers to use GraphQL.

jpvajda commented 1 year ago

Just adding a reference to the growing interest in Flutter for Android Development, DroidCon London had 17 talks on Flutter.

marc-wilson commented 8 months ago

+1

mariapapag commented 1 month ago

Really having a hard time finding a work around to be able to use GQL subscriptions in a flutter app. Please advise