Skip to content

Conversation

@djstrong
Copy link
Contributor

  • Introduced multiple new GraphQL queries for domain and resolver functionalities, including fetching domains by name, label, and namehash.
  • Added a category field to saved queries for better organization.
  • Enhanced existing queries to support additional data retrieval options, improving overall functionality.

… resolver operations

- Introduced multiple new GraphQL queries for domain and resolver functionalities, including fetching domains by name, label, and namehash.
- Added a category field to saved queries for better organization.
- Enhanced existing queries to support additional data retrieval options, improving overall functionality.
@changeset-bot
Copy link

changeset-bot bot commented Jun 11, 2025

🦋 Changeset detected

Latest commit: d7b9608

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

This PR includes changesets to release 10 packages
Name Type
ensadmin Minor
ensindexer Minor
ensrainbow Minor
@ensnode/ens-deployments Minor
@ensnode/ensrainbow-sdk Minor
@ensnode/ponder-metadata Minor
@ensnode/ensnode-schema Minor
@ensnode/ponder-subgraph Minor
@ensnode/ensnode-sdk Minor
@ensnode/shared-configs Minor

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

vercel bot commented Jun 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
admin.ensnode.io ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 23, 2025 0:02am
ensnode.io ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 23, 2025 0:02am
ensrainbow.io ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 23, 2025 0:02am

…records

- Introduced a new query to fetch historical resolver records, including resolver details and changes over time.
- Enhanced saved queries with additional operation for improved data retrieval related to ENS domains.
- Introduced a new query to retrieve domains with pagination support, allowing for efficient data fetching.
- Enhanced saved queries to include the new operation for improved data management related to ENS domains.
Copy link
Member

@lightwalker-eth lightwalker-eth left a comment

Choose a reason for hiding this comment

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

@djstrong Cool this is moving in a nice direction 👍 Shared a few suggestions

djstrong added 2 commits June 16, 2025 12:57
…tter clarity

- Added descriptive text for various saved queries to improve understanding of their functionality and usage.
- Updated the SavedQuery interface to include an optional description field for enhanced documentation.
@djstrong
Copy link
Contributor Author

All review comments are addressed and a few new queries are added.

Copy link
Member

@lightwalker-eth lightwalker-eth left a comment

Choose a reason for hiding this comment

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

@djstrong Hey awesome to see this! Appreciate this is a big effort 👍 Nice work 🙌

I have various feedback. Overall I think it's best to merge this in more eagerly as soon as you resolve the points you're comfortable to resolve and then we create separate PRs for additional refinements later 😄

name: "Get Latest Domains",
category: "Domain",
description:
"Retrieves the most recently created domains in descending order by creation time. Useful for monitoring new domain registrations and understanding recent activity on the ENS network.",
Copy link
Member

Choose a reason for hiding this comment

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

We should note here the distinction of Domains vs Registrations. There's a long story here. Please setup a call with me and we can discuss.

name: "Get Domain by Name",
category: "Domain",
description:
"Looks up a domain by its human-readable name (e.g., 'ens.eth'). This is more user-friendly than using namehash but may be slightly less efficient for programmatic access.",
Copy link
Member

Choose a reason for hiding this comment

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

The key issue here is not that it's less efficient. The key issue is that it's not always reliable. See https://ensnode.io/docs/usage/querying-best-practices/#stable-name-identification

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Corrected.

category: "Domain",
description:
"Retrieves only the domain-level events (transfers, ownership changes, wrapping events) without registration or resolver events. Use this when you're specifically interested in domain ownership and management events.",
//events(orderBy: blockNumber, orderDirection: desc) is not working
Copy link
Member

Choose a reason for hiding this comment

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

Interesting. Why isn't it working? Is this something we should be concerned about?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It works on the ENS Subgraph.

{
operationName: "getRegistrationByTokenId", //similar to getSubgraphRegistrant - remove?
id: "28",
name: "Get Registration by Token ID",
Copy link
Member

Choose a reason for hiding this comment

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

Hmm I don't think it's right to call this a TokenId in all cases

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is right only for:
"For an unwrapped .eth 2LD (second-level domain), the token ID for the ERC-721 NFT is the same as the labelhash for the second-level part of the domain."

…ed queries with structured categories

- Added SavedQueryCategory enum to standardize query categories across the application.
- Updated existing saved queries to utilize the new enum for improved clarity and consistency in categorization.
- Enhanced descriptions for several queries to provide better context and usability.
@djstrong djstrong requested a review from Copilot June 23, 2025 12:00
Copy link
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

This PR enhances the saved-queries plugin by adding categorical metadata and descriptions to each saved GraphQL query, and wires these new fields into the sample page.

  • Introduce SavedQueryCategory enum and add category + description to SavedQuery interface
  • Export new enum in plugin index for external use
  • Update sample savedQueries in page.tsx to include the new fields

Reviewed Changes

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

File Description
apps/ensadmin/src/components/graphiql-editor/plugins/saved-queries/saved-queries-plugin.tsx Added SavedQueryCategory enum and new category/description properties on SavedQuery
apps/ensadmin/src/components/graphiql-editor/plugins/saved-queries/index.ts Exported the SavedQueryCategory enum
apps/ensadmin/src/app/gql/ponder/page.tsx Updated sample queries to supply category and description
.changeset/shy-glasses-sip.md Bumped ensadmin to minor and described the feature addition
Comments suppressed due to low confidence (3)

apps/ensadmin/src/components/graphiql-editor/plugins/saved-queries/saved-queries-plugin.tsx:9

  • [nitpick] Add a JSDoc comment above SavedQueryCategory to explain its purpose and the criteria for each category to improve maintainability.
export enum SavedQueryCategory {

apps/ensadmin/src/components/graphiql-editor/plugins/saved-queries/saved-queries-plugin.tsx:21

  • Making category and description required may break existing persisted queries missing these fields. Consider marking them optional or providing defaults for backward compatibility.
  category: SavedQueryCategory;

apps/ensadmin/src/components/graphiql-editor/plugins/saved-queries/saved-queries-plugin.tsx:22

  • New fields category and description introduce UI logic (e.g., filtering or display). Add or update unit tests to verify these fields are handled correctly.
  description: string;

@djstrong djstrong merged commit 3ae7bb1 into main Jun 23, 2025
7 checks passed
@djstrong djstrong deleted the more-saved-queries branch June 23, 2025 15:43
@github-project-automation github-project-automation bot moved this from Ready for Review to Done in NameHash Jun 23, 2025
@github-actions github-actions bot mentioned this pull request Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Docs related ensadmin ENSAdmin related

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants