fluree / core

Fluree releases and public bug reports
0 stars 0 forks source link

`@base` and `@vocab` are not being used in expansion during commits #45

Open aaj3f opened 8 months ago

aaj3f commented 8 months ago

Description

Where the following example previously worked to use @base & @vocab to expand nessie to http://example.org/nessie and isScary to http://example.org/terms/isScary, they currently are not.

Example txn:

{
    "@context": [
        "https://ns.flur.ee/",
        {
            "@base": "http://example.org/",
            "@vocab": "http://example.org/terms/"
        }
    ],
    "ledger": "cookbook/base",
    "insert": {
        "@id": "nessie",
        "@type": "SeaMonster",
        "isScary": false
    }
}

DB file produced in commits dir:

{
  "@context": {
    "f": "https://ns.flur.ee/ledger#",
    "f:assert": { "@container": "@graph" },
    "f:previous": { "@type": "@id" }
  },
  "@id": "fluree:db:sha256:bb2ymfvh4cl3v2ey2atny5p7652vsctgqlhrmgs5z2gcinmgi2iss",
  "@type": ["f:DB"],
  "f:assert": [
    { "@id": "nessie", "@type": "SeaMonster", "isScary": { "@value": false } }
  ],
  "f:flakes": 395,
  "f:previous": "fluree:db:sha256:bwqpumestobtdewyqfo2zf4jyoikybgiuqd2gxi4332vaczlf5bl",
  "f:size": 35738,
  "f:t": 20,
  "f:v": 0
}
cap10morgan commented 8 months ago

Yep, definitely seeing a regression here.

In this test: https://github.com/fluree/db/pull/618/files

...the first test passes but the second one fails with an invalid query error saying Undefined RDF type specified: SeaMonster

cap10morgan commented 8 months ago

Fixed by https://github.com/fluree/db/pull/620