Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Enable session config in searchSchema #2

Merged
merged 2 commits into from
Jan 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cognite/neo4j-graphql-js",
"version": "2.19.1",
"version": "2.19.2",
"description": "A GraphQL to Cypher query execution layer for Neo4j. ",
"main": "./dist/index.js",
"scripts": {
Expand Down
9 changes: 7 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,13 @@ export const assertSchema = ({
});
};

export const searchSchema = async ({ driver, schema, debug = false }) => {
const session = driver.session();
export const searchSchema = async ({
driver,
schema,
debug = false,
sessionParams = {}
}) => {
const session = driver.session(sessionParams);
// drop all search indexes, given they cannot be updated via a second CALL to createNodeIndex
const dropStatement = `
CALL db.indexes() YIELD name, provider WHERE provider = "fulltext-1.0"
Expand Down