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

Should be able to @construct with a property variable in a nested subject #145

Open
Peeja opened this issue Apr 6, 2023 · 0 comments
Open

Comments

@Peeja
Copy link
Contributor

Peeja commented Apr 6, 2023

test('constructs with a property variable in a nested subject', async () => {
  await api.write<Subject>({ '@id': 'fred', stats: { height: 5, age: 40 } } );
  await expect(api.read<Construct>({
    '@construct': { 'stats': { '?': 5 } }
  })).resolves.toEqual([{
    "@id": "fred",
    "stats": {
      '@id': expect.stringMatching(genIdRegex),
      height: 5
    }
  }]);
});

Throws:

Error: Unhandled error. (Error: No index compatible with pattern {"subject":{"termType":"NamedNode","value":"http://test.m-ld.org/.well-known/genid/clg5fa9310002n2y11syg04xb"},"object":{"termType":"Literal","value":"5","language":"","datatype":{"termType":"NamedNode","value":"http://www.w3.org/2001/XMLSchema#integer"}},"graph":{"termType":"DefaultGraph","value":""}} and options {}
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