From b4ca56c86ec0a32c78f06b5eb70789776cc3e77e Mon Sep 17 00:00:00 2001 From: angrykoala Date: Thu, 28 Aug 2025 11:46:01 +0100 Subject: [PATCH] Add addVersionPrefix option in the Getting Started guide --- modules/ROOT/pages/getting-started/index.adoc | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/modules/ROOT/pages/getting-started/index.adoc b/modules/ROOT/pages/getting-started/index.adoc index 3f2c3a55..748558c4 100644 --- a/modules/ROOT/pages/getting-started/index.adoc +++ b/modules/ROOT/pages/getting-started/index.adoc @@ -128,13 +128,25 @@ const server = new ApolloServer({ schema: await neoSchema.getSchema(), }); + const { url } = await startStandaloneServer(server, { + context: async ({ req }) => ({ + req, + cypherQueryOptions: { + addVersionPrefix: true, + }, + }), listen: { port: 4000 }, }); console.log(`🚀 Server ready at ${url}`); ---- +[NOTE] +==== +If you are using Neo4j 4.x, set the value of `addVersionPrefix` to false. Note that this may cause issues with AuraDB or Neo4j 2025 instances. +==== + == Start the server @@ -171,7 +183,12 @@ const server = new ApolloServer({ }); const { url } = await startStandaloneServer(server, { - context: async ({ req }) => ({ req }), + context: async ({ req }) => ({ + req, + cypherQueryOptions: { + addVersionPrefix: true, + }, + }), listen: { port: 4000 }, });