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 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.