Importing Verifiable Data as Labeled Property Graphs

I've been using Neo4j <https://neo4j.com/> a lot lately.

One of my favorite features is the ability to preview (framed) JSON-LD.

For example:

```
CALL n10s.rdf.preview.inline(
'
    {
        "@type": "https://schema.org/Organization",
        "https://schema.org/description": "Realigned maximized alliance",
        "https://schema.org/name": "Bartell Inc 🔥"
    }
', 'JSON-LD')
```

For simple cases this works fine... but when I attempt to apply this to
spec compliant verifiable credentials, I get a weird blank node issue with
the proof block.

Here is a picture of what I mean:

[image: Screen Shot 2022-06-15 at 1.40.12 PM.png]

Notice the 2 blank nodes that separate these disjoint subgraphs.

I believe this is caused by the way the `proof` block is defined in the v1
context:

https://github.com/w3c/vc-data-model/blob/v1.1/contexts/credentials/v1#L45

```
"proof": {"@id": "sec:proof", "@type": "@id", "@container": "@graph"},
```

This is a lot of complexity... for one of the most important term
definitions the standard provides.

I believe this is also the cause of the "double blank node" issue, I
observed above.

I think what happens is that a first blank node is created for the proof,
and since that node has `@container` `@graph`, instead of being able to
trace the relationships directly from credential to proof to verification
method...

Each proof is being treated as a disjoint subgraph, and the relationship is
not being preserved during import...

This is really not ideal, since I am interested in querying changes in
these proofs over time for credentials, and that relationship is not being
imported.

I suspect this is solvable with a more complicated graph config:
https://neo4j.com/labs/neosemantics/4.0/config/

But I wonder if we might correct this behavior in VC Data Model 2.0, such
that RDF representations don't have this odd behavior when imported as
labeled property graphs.

Anyone know how to solve this?

If someone has a better list to ask this question, would you mind looping
them in?

If you prefer to answer on the github issue for the standard, I raised it
here: https://github.com/w3c/vc-data-model/issues/881

Regards,

OS


-- 
*ORIE STEELE*
Chief Technical Officer
www.transmute.industries

<https://www.transmute.industries>

Received on Wednesday, 15 June 2022 19:21:17 UTC