File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -252,18 +252,35 @@ export function extractRawNodesAndRelationShipsFromRecords(
252252 )
253253 )
254254
255- for ( const item of flatTruncatedItems ) {
255+ const findAllEntities = item => {
256256 if ( item instanceof types . Relationship ) {
257257 rawRels . add ( item )
258+ return
258259 }
259260 if ( item instanceof types . Node ) {
260261 rawNodes . add ( item )
262+ return
261263 }
262264 if ( item instanceof types . Path ) {
263265 paths . add ( item )
266+ return
267+ }
268+ if ( Array . isArray ( item ) ) {
269+ for ( const subItem of item ) {
270+ findAllEntities ( subItem )
271+ }
272+ return
273+ }
274+ if ( item && typeof item === 'object' ) {
275+ for ( const subItem of Object . values ( item ) ) {
276+ findAllEntities ( subItem )
277+ }
278+ return
264279 }
265280 }
266281
282+ findAllEntities ( flatTruncatedItems )
283+
267284 for ( const path of paths ) {
268285 if ( path . start ) {
269286 rawNodes . add ( path . start )
You can’t perform that action at this time.
0 commit comments