Skip to content

Commit

Permalink
ensure node expansion runs against the correct database
Browse files Browse the repository at this point in the history
  • Loading branch information
OskarDamkjaer committed Aug 1, 2024
1 parent 40e9a4c commit 382765d
Showing 1 changed file with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,30 @@ import { Bus } from 'suber'

import { GraphModel, GraphVisualizer } from 'neo4j-arc/graph-visualization'

import { StyledVisContainer } from './VisualizationView.styled'
import { resultHasTruncatedFields } from 'browser/modules/Stream/CypherFrame/helpers'
import bolt from 'services/bolt/bolt'
import {
BasicNode,
BasicNodesAndRels,
BasicRelationship
BasicRelationship,
deepEquals
} from 'neo4j-arc/common'
import bolt from 'services/bolt/bolt'
import { NEO4J_BROWSER_USER_ACTION_QUERY } from 'services/bolt/txMetadata'
import { deepEquals } from 'neo4j-arc/common'
import { GlobalState } from 'shared/globalState'
import { ROUTED_CYPHER_READ_REQUEST } from 'shared/modules/cypher/cypherDuck'
import {
getNodePropertiesExpandedByDefault,
setNodePropertiesExpandedByDefault
} from 'shared/modules/frames/framesDuck'
import * as grassActions from 'shared/modules/grass/grassDuck'
import {
getMaxFieldItems,
shouldShowWheelZoomInfo,
update as updateSettings
} from 'shared/modules/settings/settingsDuck'
import {
getNodePropertiesExpandedByDefault,
setNodePropertiesExpandedByDefault
} from 'shared/modules/frames/framesDuck'
import { DetailsPane } from './PropertiesPanelContent/DetailsPane'
import OverviewPane from './PropertiesPanelContent/OverviewPane'
import { StyledVisContainer } from './VisualizationView.styled'

type VisualizationState = {
updated: number
Expand Down Expand Up @@ -198,7 +198,11 @@ LIMIT ${maxNewNeighbours}`
this.props.bus &&
this.props.bus.self(
ROUTED_CYPHER_READ_REQUEST,
{ query: query, queryType: NEO4J_BROWSER_USER_ACTION_QUERY },
{
query: query,
queryType: NEO4J_BROWSER_USER_ACTION_QUERY,
useDb: this.props.result.summary.database.name
},
(response: any) => {
if (!response.success) {
reject(new Error())
Expand Down Expand Up @@ -246,7 +250,8 @@ LIMIT ${maxNewNeighbours}`
{
query,
params: { existingNodeIds, newNodeIds },
queryType: NEO4J_BROWSER_USER_ACTION_QUERY
queryType: NEO4J_BROWSER_USER_ACTION_QUERY,
useDb: this.props.result.summary.database.name
},
(response: any) => {
if (!response.success) {
Expand Down

0 comments on commit 382765d

Please sign in to comment.