Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dataFunction not rendering graph with optional matches where relationships are null #379

Open
exoup opened this issue Jan 23, 2024 · 0 comments

Comments

@exoup
Copy link

exoup commented Jan 23, 2024

Expected Behavior (Mandatory)

Using dataFunction to render a graph with optional matches (i.e. where nodes may be null) should still render.
This does work when using cypher to generate a graph.

Actual Behavior (Mandatory)

Graphs fails to render.

With consoleDebug: true, the nodes with null never appear in the console log, whereas they do appear when using an initial cypher instead.

How to Reproduce the Problem

Use a datafunction that has an optional match that returns at least one node as null, and then attempt to render the graph.

Simple Example

Sample dataset

[
    {
        "keys": [
            "u",
            "k",
            "u2"
        ],
        "length": 3,
        "_fields": [
            {
                "identity": {
                    "low": 9,
                    "high": 0
                },
                "labels": [
                    "User"
                ],
                "properties": {
                    "name": "Eva Brown",
                    "id": "24e7bca8-c637-45d0-abc0-21885956bb06",
                    "department": "Sales",
                    "title": "Sales Representative",
                    "email": "[email protected]"
                },
                "elementId": "4:e9e232fc-0370-45f3-bd2f-c086d1cdc93d:9"
            },
            {
                "identity": {
                    "low": 12,
                    "high": 272105984
                },
                "start": {
                    "low": 12,
                    "high": 0
                },
                "end": {
                    "low": 9,
                    "high": 0
                },
                "type": "KNOWS",
                "properties": {
                    "quality": {
                        "low": 3,
                        "high": 0
                    }
                },
                "elementId": "5:e9e232fc-0370-45f3-bd2f-c086d1cdc93d:1168686302325899276",
                "startNodeElementId": "4:e9e232fc-0370-45f3-bd2f-c086d1cdc93d:12",
                "endNodeElementId": "4:e9e232fc-0370-45f3-bd2f-c086d1cdc93d:9"
            },
            {
                "identity": {
                    "low": 12,
                    "high": 0
                },
                "labels": [
                    "User"
                ],
                "properties": {
                    "name": "Richard McGee",
                    "id": "e424e056-430e-42d4-8aa1-f7358f3b965e",
                    "department": "Operations",
                    "title": "Operations Manager",
                    "email": "[email protected]"
                },
                "elementId": "4:e9e232fc-0370-45f3-bd2f-c086d1cdc93d:12"
            }
        ],
        "_fieldLookup": {
            "u": 0,
            "k": 1,
            "u2": 2
        }
    },
    {
        "keys": [
            "u",
            "k",
            "u2"
        ],
        "length": 3,
        "_fields": [
            {
                "identity": {
                    "low": 10,
                    "high": 0
                },
                "labels": [
                    "User"
                ],
                "properties": {
                    "name": "Michael Davis",
                    "id": "ab8d3ef9-f66f-4fbe-a58e-a8c295bdeb8f",
                    "department": "Engineering",
                    "title": "Senior Software Engineer",
                    "email": "[email protected]"
                },
                "elementId": "4:e9e232fc-0370-45f3-bd2f-c086d1cdc93d:10"
            },
            null,
            null
        ],
        "_fieldLookup": {
            "u": 0,
            "k": 1,
            "u2": 2
        }
    }
]

Specifications (Mandatory)

Currently used versions

Versions

  • OS: Server: Ubuntu Server, Client: Windows 11
  • Library: 2.1.0 and 2.1.1-alpha1
  • Neo4j: 5.16-aura

I suspect it's a similar issue to the one mentioned here regarding NaN: #265

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant