Skip to content

setThing not creating blank nodes included within a Thing #1544

Description

@Maximvdw

I am experiencing issues with setThing ignoring blankNodes entirely. The internal dataset changelog will have no quads for the blank node. This seems to be expected behavior according to this line;
https://github.com/inrupt/solid-client-js/blob/main/src/thing/thing.internal.ts#L121
which removes them from the "additions". Removing this filter fixes the issue without any failed tests, so I am not sure why it is being used?

I've created a unit test in this fork:
Maximvdw@d2227cf

The unit test creates a mock object:

const mockThing3: ThingPersisted = {
    type: "Subject",
    url: mockThing3Iri,
    predicates: {
      ["https://arbitrary.vocab/predicate"]: {
        namedNodes: ["https://arbitrary.vocab/object"],
        blankNodes: [
          {
            ["https://arbitrary.vocab/blanknode/predicate"]: {
              namedNodes: ["https://arbitrary.vocab/blanknode/object"],
            },
          },
        ],
      },
    },
  };

When using setThing only one quad will be added (the named node) which is verified
with the test line at Maximvdw@d2227cf#diff-b64c1976153ad9380bdd23fab11663989148669f7f2e99cbd3faf7342a687b34R600

Is this intended behavior for setThing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions