Skip to content

fix: use by over for for Resolver.records_ arg#1934

Merged
shrugs merged 2 commits intomainfrom
worktree-fix-1904-records-by
Apr 16, 2026
Merged

fix: use by over for for Resolver.records_ arg#1934
shrugs merged 2 commits intomainfrom
worktree-fix-1904-records-by

Conversation

@shrugs
Copy link
Copy Markdown
Collaborator

@shrugs shrugs commented Apr 15, 2026

Summary

  • Renames Resolver.records_(for:) to Resolver.records_(by:) in the Omnigraph API so every id lookup uses the same by argument convention.
  • Regenerates enssdk's schema.graphql + gql.tada introspection to match.
  • Breaking change to the GraphQL schema, but there are no known consumers of this field yet.

Closes #1904.

Test plan

  • pnpm -F ensapi typecheck
  • pnpm -F enssdk typecheck
  • pnpm lint
  • pnpm test --project ensapi --project enssdk

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings April 15, 2026 21:53
@shrugs shrugs requested a review from a team as a code owner April 15, 2026 21:53
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 15, 2026

🦋 Changeset detected

Latest commit: 8fcaf67

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 24 packages
Name Type
ensapi Major
enssdk Major
ensadmin Major
ensindexer Major
ensrainbow Major
@ensnode/enskit-react-example Patch
@namehash/ens-referrals Major
@ensnode/ensdb-sdk Major
enskit Major
@ensnode/ensnode-react Major
@ensnode/ensnode-sdk Major
@ensnode/ensrainbow-sdk Major
@namehash/namehash-ui Major
@ensnode/integration-test-env Patch
fallback-ensapi Major
@docs/ensnode Major
@docs/ensrainbow Major
enscli Major
ensskills Major
@ensnode/datasources Major
@ensnode/ponder-sdk Major
@ensnode/ponder-subgraph Major
@ensnode/shared-configs Major
@docs/mintlify Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
admin.ensnode.io Ready Ready Preview, Comment Apr 15, 2026 10:04pm
ensnode.io Ready Ready Preview, Comment Apr 15, 2026 10:04pm
ensrainbow.io Ready Ready Preview, Comment Apr 15, 2026 10:04pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 15, 2026

Warning

Rate limit exceeded

@shrugs has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 36 minutes and 35 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 36 minutes and 35 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 940b5ee4-30e7-4d58-ae53-3e810b06eeaa

📥 Commits

Reviewing files that changed from the base of the PR and between d594a38 and 8fcaf67.

⛔ Files ignored due to path filters (3)
  • packages/enssdk/src/omnigraph/generated/graphql-env.ts is excluded by !**/generated/**
  • packages/enssdk/src/omnigraph/generated/introspection.ts is excluded by !**/generated/**
  • packages/enssdk/src/omnigraph/generated/schema.graphql is excluded by !**/generated/**
📒 Files selected for processing (2)
  • .changeset/fix-records-by-arg.md
  • apps/ensapi/src/omnigraph-api/schema/resolver.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch worktree-fix-1904-records-by

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Standardizes the Omnigraph GraphQL API argument naming by renaming Resolver.records_’s lookup argument from for to by, and updates the generated schema artifacts accordingly.

Changes:

  • Rename Resolver.records_(for:)Resolver.records_(by:) in the Omnigraph API resolver implementation.
  • Regenerate enssdk’s published GraphQL schema (schema.graphql) and gql.tada introspection to reflect the new argument name.
  • Add a changeset noting the (intentional) breaking API change for ensapi and enssdk.

Reviewed changes

Copilot reviewed 2 out of 4 changed files in this pull request and generated no comments.

File Description
packages/enssdk/src/omnigraph/generated/schema.graphql Updates the public schema definition to use records_(by: ...).
packages/enssdk/src/omnigraph/generated/introspection.ts Updates gql.tada introspection so generated client typing matches the schema change.
apps/ensapi/src/omnigraph-api/schema/resolver.ts Implements the argument rename in the server schema/resolver definition.
.changeset/fix-records-by-arg.md Records the breaking API rename for release notes/versioning.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 15, 2026

Greptile Summary

Renames the Resolver.records_ GraphQL argument from for to by across the Omnigraph API schema, resolver implementation, and all generated artifacts (introspection.ts, schema.graphql) for consistency with other id-lookup fields. Two minor housekeeping points worth a look before merge: the changeset uses minor for a self-described breaking change on post-1.0 packages, and the sibling graphql-env.ts introspection file was not updated alongside introspection.ts.

Confidence Score: 5/5

Safe to merge — the rename is clean and all active generated artifacts are consistent.

All remaining findings are P2: a SemVer bump classification question in the changeset, and a stale sibling generated file that nothing imports. Neither blocks correctness or type-safety of the active code paths.

.changeset/fix-records-by-arg.md (minor vs major bump) and packages/enssdk/src/omnigraph/generated/graphql-env.ts (not updated in this PR).

Important Files Changed

Filename Overview
apps/ensapi/src/omnigraph-api/schema/resolver.ts Renames the records_ field argument from for to by in the Pothos schema and updates resolver body references — straightforward, correct change.
packages/enssdk/src/omnigraph/generated/introspection.ts Auto-generated introspection file correctly updated: the single records_ argument entry changed from "for" to "by", consistent with the schema change.
packages/enssdk/src/omnigraph/generated/schema.graphql Generated schema correctly reflects the argument rename on Resolver.records_.
.changeset/fix-records-by-arg.md Changeset labels the rename as minor for both packages, but renaming a published GraphQL argument is a breaking change that SemVer classifies as major.

Sequence Diagram

sequenceDiagram
    participant Client
    participant GraphQL as Omnigraph API
    participant Resolver as resolver.ts

    Client->>GraphQL: query { resolver { records_(by: { name: "foo.eth" }) } }
    Note over GraphQL: arg renamed from `for` to `by`
    GraphQL->>Resolver: resolve({ chainId, address }, args)
    Resolver->>Resolver: args.by.node ?? namehashInterpretedName(args.by.name)
    Resolver-->>Client: ResolverRecords
Loading

Reviews (1): Last reviewed commit: "fix: use `by` over `for` for Resolver.re..." | Re-trigger Greptile

Comment thread .changeset/fix-records-by-arg.md
Comment thread packages/enssdk/src/omnigraph/generated/introspection.ts
Standardizes the Omnigraph API on `by` for id lookups. Closes #1904.
No longer needed; gql.tada now writes only introspection.ts.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 5 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

@tk-o tk-o left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shrugs shrugs merged commit b8f5be7 into main Apr 16, 2026
22 checks passed
@shrugs shrugs deleted the worktree-fix-1904-records-by branch April 16, 2026 14:22
@github-actions github-actions bot mentioned this pull request Apr 16, 2026
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.

Omnigraph: use by over for for permissions id lookup

3 participants