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

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

Open
d-jeffery opened this issue Aug 22, 2024 · 3 comments

Comments

@d-jeffery
Copy link
Contributor

d-jeffery commented Aug 22, 2024

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
Copy link
Contributor Author

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.

@rhamzeh rhamzeh moved this from Backlog to Ready in SDKs and Tooling Sep 9, 2024
@Akshayp02
Copy link

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!

@d-jeffery
Copy link
Contributor Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready
Development

No branches or pull requests

2 participants