Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
05-07-2020 11:34 AM
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 : https://github.com/louisdeveseleer/graphql_app/blob/master/main.dart
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 dbms.security.auth_enabled=false
-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:
{Movie{
title
}
}
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: 'https://countries.trevorblades.com/'
(used for testing)
by
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.
05-08-2020 11:26 AM
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?
05-08-2020 11:31 AM
Hi!
05-08-2020 11:36 AM
I never used the flutter connection, but have you tried the bolt connection?
05-08-2020 11:42 AM
How can I do that?
Typing bolt://localhost:7687 in the browser does not work.
05-08-2020 04:58 PM
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.
06-05-2020 04:21 PM
Were you able to figure anything out? I'm about to try Flutter - Neo4j too
06-07-2020 08:31 AM
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.
07-03-2020 07:41 AM
Here is a solution to try : Neo4j user trying to implement it with GraphQl and use it in a Flutter app
All the sessions of the conference are now available online