Skip to content

Commit

Permalink
More correct relationship shape check
Browse files Browse the repository at this point in the history
  • Loading branch information
oskarhane committed Mar 5, 2018
1 parent 95f9fb4 commit a2f66c2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/shared/services/bolt/boltMappings.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ export const applyGraphTypes = item => {
const relationship = applyGraphTypes(item.relationship)
return new neo4j.types.PathSegment(start, relationship, end)
} else if (
item.hasOwnProperty('identity') &&
item.hasOwnProperty('start') &&
item.hasOwnProperty('end') &&
item.hasOwnProperty('type')
Expand Down
8 changes: 7 additions & 1 deletion src/shared/services/bolt/boltMappings.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,13 @@ describe('boltMappings', () => {
test('should apply node type', () => {
const rawNode = {
labels: ['Test'],
properties: [],
properties: [
{
type: 'mytype',
start: 'epoch1',
end: 'epoch2'
}
],
identity: { low: 5, high: 0 }
}

Expand Down

0 comments on commit a2f66c2

Please sign in to comment.