Graphql_flutter Failed to connect to local database

Hey everyone, I am trying to build a Flutter app that will use Neo4j as database.
I am new to programming and new to Neo4j.
The plugin graphql_flutter should allow me to communicate with the database through using GraphQL.
I created a test app that fetches data from a freely available database and that works, so the code should be good. Here is the code : graphql_app/main.dart at master · louisdeveseleer/graphql_app · GitHub

Here are the steps I followed on the Neo4j side:
-Create a local database on Neo4j desktop
-Install the GraphQL plugin
-Remove authentication for this database (to make things easier to start with) with the setting
-Populate this database with the sample movie data :play movie
-Automatically generate the graphql schema (CALL graphql.idl(null);)
-Launch GraphiQL and connect to http://localhost:7474/graphql/
-Test a query:


which returned a list of movies, so everything seems to be set up right.

Here is the issue:
When in the Flutter app I replace the line for the HttpLink
uri: '' (used for testing)
uri: 'http://localhost:7474/graphql/'
then i get this error on the app screen:
ClientException: Failed to connect to http://localhost:7474/graphql/:

And since it is working with GraphiQL, I don't know what to do here.

Hi Louis,
Some questions:

• Which version of neo4j are you using?
• Were you able to connect at some point with some other code?
• Did you test the connection directly via neo4j desktop | browser?


  • Neo4j 4.0.1
  • It's the first time I am trying to connect to my local database with a code
  • I can access the database by going into a browser and typing http://localhost:7474/browser/ (or through the desktop)

I never used the flutter connection, but have you tried the bolt connection?

How can I do that?
Typing bolt://localhost:7687 in the browser does not work.

I am now trying Google cloud platform to host and access my database through GraphQL. The hosting of the database is up and running but I struggle to find exactly how to install a graphql plugin on it.

Were you able to figure anything out? I'm about to try Flutter - Neo4j too

No. I switched to Firebase and everything is much easier to setup and manage. I still like the idea of a graph database, but the implementation is just too technically difficult to be worth it in my case.

Here is a solution to try : Neo4j user trying to implement it with GraphQl and use it in a Flutter app - #7 by john3haris