cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Neo4j user trying to implement it with GraphQl and use it in a Flutter app

Hey all, you can call me Yaya.

I'm in my mid-twenties and currently, I'm working on a Flutter app..
After spending some time with Firestore I've realized that it does not suit me well and that's how my journey started into looking into what do I need as a database to fulfill my need and make my app come to life, it all started with one google search "What is the best graph database" and that's how I was introduced into Neo4j (Luckily for me ), after spending some time reading, researching and working with Neo4j I was able to get my head wrapped around it and now I'm here in the community seeking help with the few issues/features that I'm still struggling with. I hope to be able to be as much of a helpful asset as I am someone in need.

Thank you so much and good luck to all of you. Yaya.

22 REPLIES 22

Hey Yaya,
I had also tried Firestore quickly before discovering Neo4j and I am so happy to be working with a graph database for my project. I just learned about Flutter and I am trying to see if using it with Neo4j would be possible.
How are you doing so far working with GraphQI ?

Hey @louis.deveseleer I'm so sorry for the late reply. I have just seen you message. I am indeed working with Both Flutter and Neo4j using Grandstack and Graphql-Flutter Package.

Let me know if you need any help. As for me everything seems to be working just fine. So if you need any help with Flutter, Neo4j or Grandstack let me know.

Good luck.

Hey thanks for your reply. I had issues reading my database with the graphql_flutter plugin (Graphql_flutter Failed to connect to local database) and in the end, because of the technical difficulties in general and lack of documentation, I went back to using Firebase, which is so easy in comparison. Good luck with your project!

Are you using Android for development ?? because if so then maybe you have to change the link from ( localhost:7474/graphql ) into ( ip-address:7474/graphql ). in the ip-address put your computer ip address.. I have faced the same issue and this has solved it for me. For android I use ip-address and for IOS i use localhost.
You can also do this in flutter.

import 'dart:io';

final GraphQLClient client = getClient(
   uri: Platform.isAndroid ? 'http://ip-address':7474/graphql : 'http://localhost:7474/graphql',
);

That's the kind of help I was missing 🙂 I posted a link to your answer in my original post for reference.

Another issue I was facing was to install GraphQl on a server hosting the database (Difficulties installing neo4j-graphql on Google cloud server). It was easy on the desktop version, as there was simply a plugin to install, but I couldn't find exactly how to configure it for the server version.

Hey John we're about to tackle the GraphQl flutter Neo4j challenge as well. Are you still up for helping out - any updates on your experience progress and process?

Hey @alejosun. So sorry for the late response.

Yes, I am still working with Grandstack (minus Apollo) with Flutter. Let me know if there's anything you want to know.

I have the same problem and I try your suggestion but it is not work
Let me know if you have another solution, thanks!

What are the exact issues you're facing?

I'm trying to connect my local neo4j database with flutter application using #grandstack and #graphql_flutter , all thing work done until I replace the line for the HttpLink
uri: 'https://countries.trevorblades.com/' (used for testing)
by
uri: 'http://127.0.0.1:7474/graphql/'
then i get this error on the app screen:

I think you should change your URL uri: 'http://127.0.0.1:7474/graphql/' to your local ip-address it is gonna be something like (http://192.168.1.109: 7474/graphql). Check your network preferences for the ip-adress and change your 127.0.0.1 with what you have.

oren
Node Clone

Hi Yaya!
I'm about to kick-off a project with a flutter client talking to a graphql server that interfaces with a neo4j database. I haven't started yet, so I'm not sure I have any great advice for you, but my plan is to start with GRAND stack and just utilizing the backend server aspect of that project, and then using graphql-flutter. For further guidance, checkout the Neo4j youtube playlist about the GRAND stack here: https://www.youtube.com/playlist?list=PL9Hl4pk2FsvV_ojblDzXCg6gxdv437PGg

Let's keep in touch. I'd love to hear more about your progress and challenges.

Hey all. Sorry for the late response I've just seen it.

So far so good with Flutter and Neo4j.

@oren I am using Grandstack with Flutter and it is surprisingly amazing. Also i'm using GraphQl Flutter as a package.

Let me know if you need any help.

oren
Node Clone

I thought of a name for this stack!
FANG

Flutter
Apollo
Neo4j
GraphQL

Unfortunatly there's no Apollo package for Flutter yet but luckily there's an amazing package called graphql_flutter made by Zino-app which does almost the same job for Flutter.

That's true! But I think if we want to use FANG, we can still claim Apollo, since the back end is using Apollo server. But, of course, finding a clever acronym is the least important aspect of all this. Lol.

oren
Node Clone

Have you all seen that the GRANDstack starter project now includes a Flutter option?

That's great.. Finally. Do you have a link so I can take a look.
Thank you @oren for sharing the news.

Found it. For anyone interested, here's the LINK.

Once again thank you @oren for sharing the news with us.. Now hopefully we see subscriptions/streams soon. because that also is a crucial feature for building projects.

oren
Node Clone

To whoever may have landed on this page, I am about to open up a role for this exact stack.
Flutter, GraphQL, Neo4j
We are in the social justice space, so you will have a high level of satisfaction if you value having a positive social impact as much as you enjoy coding. Fully remote, full benefits, US based nonprofit. Please reach out to me if interested: oren@united4respect.org

Hi, I see that it was a while ago since this thread was active. Are you still using neo4j with flutter with the new Neo4j GraphQL Library? I have used Firebase than Supabase for my Flutter project but realized that a graph database would suit med better. My thought is to use a graphql client like graphql_flutter or ferry with my hosted Neo4j AuraDB. Having some trouble connecting to the DB though, have you done anything like this?

Hey @magnus. What is the exact issue that you're facing? Also is it a client issue or an issue from the front end?