Apollo-client: Flutter Support Request

Created on 19 Dec 2017  ·  47Comments  ·  Source: apollographql/apollo-client

Intended outcome:
Apollo Client support for Dart/Flutter, see https://flutter.io/

Actual outcome:
Currently not supported

Motivation:
Flutter and Dart are revolutionizing the cross platform mobile app development and would greatly benefit from the Apollo Client.
Since Apollo has always maintained the openness to new popular frameworks it would be great to have it support Flutter.

Most helpful comment

Flutter was featured pretty heavily at Google I/O this year. It's also considered a first-class platform (along with Android, iOS, and web) by the Material Design team.

It's pretty clear that Google is going to be pushing this strategic mobile tech pretty hard. I'd love to see proper support for it!

All 47 comments

+1 For this, I found Flutter is very interesting framework, if we can have Apollo with Flutter, it would be amazing!

+1 Really eager to build one of the smaller apps in our suite with Fultter, currently working with React Native and heavily dependent on GraphQL. Apollo would be the goto client, but since it's not supported this Dart client might be promising for now.

[EDIT - 16 June 2018]:
We decided to build our own client. We took a load of inspiration from react-apollo, and our goal is to make it as easy as possible to work with our client coming from react-apollo. PR's are welcome!

+1 Would be willing to contribute to it

+1

+1

+1

We can contribute. Let's take it forward.

+1

+1

Looks like there is some interest and possible contributors, what would be the process to get this started?

+1

A humble request to you all please do not increase noise just commenting +1. Please use Emoji to vote this up.

+1

any progress so far? :/

I am in the process of getting the code generator working for https://github.com/g33kidd/graphql_client

I don't know what happened with the original maintainer but nothing has been updated in a while, so I thought I'd give it a shot. I think getting the code generator working would be a big step towards getting an Apollo integration for Dart and Flutter, maybe?

There seems to be no other option for Dart at the moment. I would love to see Apollo on Flutter!

+1. Would be willing to contribute.

+1

@jbaxleyiii, can you close this just to the contributors, please? (avoid +1)

@johnunclesam How would you be able to track the popularity of this missing feature without the +1 ?

I agree there should be a less noisier way, but shutting it down is a bit rough and takes away your ability to track the popularity of bugs and features.

I suggest to open an issue to gather willing (new and old) contributors to work on this and track the progress.

@BerndWessels:

image

Sure, as long this isn't locked - there still needs to be a place for potential contributors to come together and organize. Maybe in its own repo?

@BerndWessels my team and I would like to contribute, I'll also try to reach out to the Apollo team see if they want to assist.

+1

I got graphql in Flutter working with this
github.com/spacedragon/graphql-fetch

It needs more work but its a good start and it also has full generation support.
I hooked it up to a golang based graphql server and was flying.
Both side do code gen and resolvers

+1
Yeah, I think This feature maybe a big thing!

Flutter was featured pretty heavily at Google I/O this year. It's also considered a first-class platform (along with Android, iOS, and web) by the Material Design team.

It's pretty clear that Google is going to be pushing this strategic mobile tech pretty hard. I'd love to see proper support for it!

+1

So I think this could be a really sweet direction, but the Apollo team won't be able to work on it for a very long time.

Would anyone be interested in taking up this project? I think a promising approach could be to just port the main features of the Apollo Client cache and query manager to Dart basically line by line, and if someone wants to seriously undertake it we could get on a call sometime and talk about ideas for how that could work.

I bet if someone built it they could get a lot of notoriety in the flutter/Google/mobile developer community!

As mentioned in https://github.com/apollographql/apollo-client/issues/2756#issuecomment-394585862, if anyone in the community is interested in working on this, definitely let us know! Since this work won't be tracked through this repo however, I'll close this request for now. Thanks all!

My college and I have been working on a client for Flutter, and just released the first version:

GitHub
Dart Pub

Currently supports Query and Mutation Widgets with polling options.

UPDATE: We now also support: Subscriptions, Links and Caching.

All help and suggestions are welcome!

Cheers! ✌🏼

@BerndWessels @NeelSarwal @sanketsahusoft @jinxac
Are you still interested in contributing?

+1

@HofmannZ yeah sure how can I get started

@HofmannZ btw I found a similar package sometime back https://github.com/spacedragon/graphql-fetch . It had few issues but I have fixed most of them to make it work in my fork https://github.com/jinxac/graphql-fetch.

I was going through the code for graphql_flutter. Looks clean. Nice effort.

But I had few questions. How are you planning to take care of following? Is this planned for future?

  1. Fragments
  2. Pagination
  3. Caching

@jinxac, we released our package in an early development stage to get as much input for the community before we solidify all core features. At the moment our main concern is to include as much features from the Apollo Client as possible. With that being said, we obviously will be including fragments, pagination and caching.

At the moment we’re working on caching, one of our engineers is currently exploring a custom implementation of tree based caching. The initial PR should land somewhere this week.

That sounds cool.

Would love to contribute towards this. Please let me know how can I be of
help.

On Tue, Jun 19, 2018, 1:51 AM Zino Hofmann notifications@github.com wrote:

@jinxac https://github.com/jinxac, we released our package in an early
development stage to get as much input for the community before we solidify
all core features. At the moment our main concern is to include as much
features from the Apollo Client as possible. With that being said, we
obviously will be including fragments, pagination and caching.

At the moment we’re working on caching, one of our engineers is currently
exploring a custom implementation of tree based caching. The initial PR
should land somewhere this week.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/apollographql/apollo-client/issues/2756#issuecomment-398182651,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AOXrwOkw5K6-g78kpfbkRwT63uZZw_qlks5t-AusgaJpZM4RHfOY
.

@jinxac we just opened a PR for our first iteration of in-memory cache #7. You can have a look there, next up on our roadmap are optimistic UI updates. If you want you can start on a PR for that.

+1

+1

+2

+10000000000000000000

+3

+1

+1 for this issue.

+1
I think so flutter will be one of the bests and most used frameworks to do mobile and desktop apps soon.

Apollo would be a nice icing on the cake.

+1

+10086

+1

As mentioned in https://github.com/apollographql/apollo-client/issues/2756#issuecomment-397356858, this isn't something that the Apollo team will be working on, but if anyone in the community is interested, great! Since that work won't be tracked here however, and to help avoid the notifications people keep getting from the +1's here, I'll lock this thread.

Was this page helpful?
0 / 5 - 0 ratings