Cypher query options, includingCypherRuntime
can be defined in GraphQL
Cypher query options can be set at a global level, which may help in resolving any Cypher issues.
Please add CypherRuntime
as a constant and then set runtime: CypherRuntime.INTERPRETED,
it when you define the neoSchema.
Below is an example snippet of code for the same:
const { ApolloServer } = require("apollo-server");
const neo4j = require("neo4j-driver");
const fs = require("fs");
const dotenv = require("dotenv");
const path = require("path");
const { Neo4jGraphQL, CypherRuntime } = require("@neo4j/graphql");
// Create executable GraphQL schema from GraphQL type definitions,
// using @neo4j/graphql to autogenerate resolvers
const neoSchema = new Neo4jGraphQL({
typeDefs,
config: {
queryOptions: {
runtime: CypherRuntime.INTERPRETED,
},
},
});
Please note that when you set this, the newly set runtime will be used for all the queries that will run.
Comments
0 comments
Article is closed for comments.