Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Feature Request] @delegate based on multiple fields

Open
#2,737 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
node.js, typescript
Domain
backend, databases

Research direction

No files are named in the report, so start by searching the repository for where @@delegate is parsed and validated in the ZModel schema tooling, then trace how a delegated field is resolved at query time in the runtime. Reproduce the request with a schema that puts @@delegate on two scalar fields and note the validation error versus the runtime error described. Done means a two-field @@delegate schema compiles and resolves correctly at runtime, with the computed-column workaround no longer needed; expect this to touch both schema validation and query generation, so it is not a single-file change.

Written by the indexing model from the issue text.

Description

Quite annoying to have to de-normalize a combined key just so that it can be used for @@delegate:

model Base {
  appKey String
  collectionKey String
  // @@delegate(appKey, collectionKey) -- Doesn't work
  combinedKey String @computed // generates just fine but produces error at runtime 
}

not to mention that that de-normalized column can't even use a @computed and has to be maintained in code.

Dominant language
TypeScript
Stars
2.9k
Forks
157
Avg merge
11h 42m
Merged PRs (30d)
20

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from zenstackhq/zenstack

All issues in zenstackhq/zenstack

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.