language icon indicating copy to clipboard operation
language copied to clipboard

Add test where `a from b` is directly assigned but contains `user:*` or `user#relation` errors out

Open d-jeffery opened this issue 1 year ago • 3 comments

Add a test that ensures that if b in the case of a from b is directly assigned but contains user:* or user#relation that we error out too.

e.g.

define parent: [folder:*]  
define viewer: viewer from parent  
define parent: [folder#parent]  
define viewer: viewer from parent  

Run against the current API and see if it properly validates against this case.

d-jeffery avatar Aug 22 '24 22:08 d-jeffery

model
  schema 1.1

type folder
  relations  
    define parent: [folder:*]  
    define viewer: viewer from parent

From the CLI:

{
  "is_valid":false,
  "error":"the relation type 'folder' on 'parent' in object type 'folder' is not valid"
}

Where as language only throws:

`parent` relation used inside from allows only direct relation.

d-jeffery avatar Aug 23 '24 20:08 d-jeffery

Hello @d-jeffery ,

I would like to contribute to this issue. Could you please assign it to me and provide any relevant references or guidance?

Thank you!

Akshayp02 avatar Oct 04 '24 01:10 Akshayp02

Hello @d-jeffery ,

I would like to contribute to this issue. Could you please assign it to me and provide any relevant references or guidance?

Thank you!

Hi, I'm no longer on this project. @rhamzeh?

d-jeffery avatar Oct 04 '24 19:10 d-jeffery