GraphQL error when connecting to Aura Free
complete
wolfgang@livedataconcepts.com
I am using the following code successfully with a paid Aura instance, but it fails when using the Free Aura instance. This is code in a .env file for the grand stack.io starter project within the api folder for an GraphQL endpoint.
NEO4J_URI=neo4j://myDB.databases.neo4j.io
NEO4J_USER=neo4j
NEO4J_PASSWORD=myPassword
NEO4J_ENCRYPTED=true
the endpoint launches fine, however, upon attempting a search it fails with the following error.
*************
"code": "INTERNAL_SERVER_ERROR",
"exception": {
"code": "SessionExpired",
"name": "Neo4jError",
"stacktrace": [
"Neo4jError: Connection was closed by server",
"
*******************
Can anyone help me around this problem, otherwise Free Aura will be of limited use to me.
Thank you in advance, Wolfgang
John Kennedy
complete
Pierre Martignon
wolfgang@livedataconcepts.com seems to me you should have specified the URI with a neo4j+s scheme (and remove NEO4J_ENCRYPTED)
Ex: neo4j+s://myDB.databases.neo4j.io
Have you validated the credentials with Browser ?
wolfgang@livedataconcepts.com
Pierre Martignon: Thank you for the suggestion. I actually had tried that before and now tried it again without success. neo4j+s works fine when I connect through Neo4j Desktop, no problem with the connection there, but when I try the GraphQL endpoint it launches fine but then errors out upon a query. I do the same approach with Aura paid and it works without problems. There must be something in the GraphQL code that Aura Free doesn't seem to like, but don't have any idea what it could be.
It would be great if one could just simply switch between free and paid by swapping the credentials and nothing else.
But I got an idea when trying these permutations. My GraphQL endpoint was created about 1 year ago. Maybe this problem has something to do with the Neo4j driver? So I switched to a new grand stack.io starter project and used it to connect. And voila it works with neo4j+s.
Insight, the Neo4j driver was changed somehow so that it can work with Aura Free. Now I just have to change my GraphQL endpoint to use the new library, which also changed. Quite a bit of work ahead, but at least I know the culprit now.
Thank you, Pierre, for getting my brain to work out some new ideas ;-)
John Kennedy
wolfgang@livedataconcepts.com: thanks for raising this, and thanks Pierre Martignon for the follow up. I'll move this to the Questions section, from the current place in the Feature Request wall.