Skip to content

Commit b4ca56c

Browse files
committed
Add addVersionPrefix option in the Getting Started guide
1 parent 7c14252 commit b4ca56c

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

modules/ROOT/pages/getting-started/index.adoc

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,25 @@ const server = new ApolloServer({
128128
schema: await neoSchema.getSchema(),
129129
});
130130
131+
131132
const { url } = await startStandaloneServer(server, {
133+
context: async ({ req }) => ({
134+
req,
135+
cypherQueryOptions: {
136+
addVersionPrefix: true,
137+
},
138+
}),
132139
listen: { port: 4000 },
133140
});
134141
135142
console.log(`🚀 Server ready at ${url}`);
136143
----
137144

145+
[NOTE]
146+
====
147+
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.
148+
====
149+
138150
== Start the server
139151

140152

@@ -171,7 +183,12 @@ const server = new ApolloServer({
171183
});
172184
173185
const { url } = await startStandaloneServer(server, {
174-
context: async ({ req }) => ({ req }),
186+
context: async ({ req }) => ({
187+
req,
188+
cypherQueryOptions: {
189+
addVersionPrefix: true,
190+
},
191+
}),
175192
listen: { port: 4000 },
176193
});
177194

0 commit comments

Comments
 (0)