Skip to content

feat: new CEL function to check existence of a relationship to a type #1438

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

Closed
wants to merge 1 commit into from

Conversation

adityathebe
Copy link
Member

@adityathebe adityathebe commented May 19, 2025

Use case

dyn(config).
  filter(item, catalog.hasRelationToType(item.app_id, "MissionControl::Application")).
  map(item, {
    "access_logs": [{
      "config_id": item.app_id,
      "external_user_id": item.user_id,
      "created_at": item.created_at
    }]
  }).toJSON()

@adityathebe adityathebe requested a review from moshloop May 19, 2025 12:14
@moshloop
Copy link
Member

Couldn't this just be len(catalog.traverse(item.app_id, "MissionControl::Application")) > 0 .

@adityathebe adityathebe force-pushed the feat/config-type-relationship-cel branch from 5866992 to d93104e Compare May 22, 2025 08:44
@adityathebe
Copy link
Member Author

@moshloop ya it's essentially just that.

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

Successfully merging this pull request may close these issues.

2 participants