3. Notice the assertion fails.
### SDK Checklist
- [X] JS SDK
- [ ] Go SDK
- [ ] .NET SDK
- [ ] Python SDK
- [ ] Java SDK
### OpenFGA SDK version
0.3.5
### OpenFGA version
0.2.6
### SDK Configuration
any
### Logs
_No response_
### References
Due to company restrictions I cannot join the slack community to check if this question has been answered there. Sorry for lying on that check box.
Checklist
Description
In all documentation on the OpenFGA site, and in the readme for the js-sdk, contextual tuples are added to
check
andlist-objects
methods using thecontextual_tuples
key. This key is ignored by the sdk as it is expectingcontextualTuples
. See https://github.com/openfga/js-sdk/blob/6e9b719c6b24aeff8e2124ae6abe2c48b2d38001/client.ts#L78 and https://github.com/openfga/js-sdk/blob/6e9b719c6b24aeff8e2124ae6abe2c48b2d38001/client.ts#L140 where the interfaces for the method bodies are declared.You can view the documentation and see how the node sdk incorrectly shows that the contextual tuples should be referenced with
contextual_tuples
.Expectation
Documentation should match the code.
Reproduction
const fgaClient = new OpenFgaClient({...}) // Details from your locally running fga instance
const {allowed} = await fgaClient.check({user: "user:test", relation: "test", object: "object:test", conditional_tuples:[{user: "user:test", relation: "test", object: "object:test"}]});
assert(allowed);