docs: more improvements for omnigraph examples#2260
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
More reviews will be available in 25 minutes and 46 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (22)
📝 WalkthroughWalkthroughConverts Omnigraph examples to a config-driven, namespace-aware system; extends the GraphQL schema for protocol acceleration and profile resolution; updates SDK example queries and vendored snapshots; migrates Astro components from namespace IDs to human-readable labels and doc URLs; refreshes scripts, example generation, and docs pages. ChangesOmnigraph Examples & Documentation Modernization
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
|
Greptile SummaryThis PR overhauls the Omnigraph documentation examples infrastructure: the old
Confidence Score: 5/5Docs-only refactor; all runtime data (examples.json, responses.json, snapshot.json) has been regenerated and committed; no application logic is affected. The config/meta consolidation is straightforward, the new test file correctly reflects the current config (including domain-subdomains-recently-registered in SEPOLIA_V2_ONLY_IDS), and the component prop rename from ENSNamespaceId to plain strings is fully threaded through all callers. The only nit is a code-formatting irregularity in the inline TypeScript snippet shown to readers. docs/ensnode.io/src/content/docs/docs/integrate/index.mdx has a minor indentation inconsistency in its example TypeScript snippet. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[config.ts\nOmnigraph Examples Config] -->|namespace per example| B[snapshot-omnigraph-version.mts\nGenerates examples.json]
A -->|namespace per example| C[fetch-omnigraph-example-responses.mts\nGenerates responses.json]
A -->|hostSeparatePage filter| D[OMNIGRAPH_EXAMPLES_SIDEBAR_ITEMS\nSidebar navigation]
B --> E[examples.json\nFrozen queries + namespace-specific vars]
C --> F[responses.json\nPer-example live responses]
E --> G[examples.ts\nomnigraphExamples array]
F --> G
A --> G
G --> H[resolve-static-example.ts\nOmnigraphStaticExampleData]
H --> I[OmnigraphStaticExampleSet.astro\nRendered doc panels]
I -->|hostedInstanceLabel\nresponseSourceLabel| J[StaticExampleOutputSection.astro\nOutput + linked footnote]
Reviews (9): Last reviewed commit: "Merge branch 'main' into ll/docs-example..." | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/ensnode-sdk/src/omnigraph-api/example-queries.ts (1)
650-669:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winRegenerate SKILL examples to avoid source drift.
GRAPHQL_API_EXAMPLE_QUERIESnow updatesnamegraphand addsaccelerate-resolve, butpackages/ensskills/skills/omnigraph/SKILL.mdstill reflects the oldernamegraphexample and does not includeaccelerate-resolve. Please re-sync the AUTOGEN examples block from this source file.Also applies to: 704-723
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/ensnode-sdk/src/omnigraph-api/example-queries.ts` around lines 650 - 669, The SKILL.md examples block is out of sync with the canonical GRAPHQL_API_EXAMPLE_QUERIES in packages/ensnode-sdk/src/omnigraph-api/example-queries.ts: update the AUTOGEN examples in packages/ensskills/skills/omnigraph/SKILL.md to match the current entries (replace the old "namegraph" example and add the new "accelerate-resolve" example) by copying the examples (including queries, ids, and variables) from GRAPHQL_API_EXAMPLE_QUERIES (look for the namegraph entry around id: "namegraph" and the new accelerate-resolve entry) so the documentation and source remain aligned.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/ensnode.io/scripts/snapshot-omnigraph-version.mts`:
- Around line 49-56: The code currently silently skips missing SDK examples in
the OMNIGRAPH_EXAMPLES_CONFIG mapping; change the behavior in the
OMNIGRAPH_EXAMPLES_CONFIG.flatMap callback (where sdkExampleById.get(config.id)
is used to build examples) to throw an error instead of console.warn/return [],
e.g. throw a descriptive Error including the missing config.id so the build
fails fast and preserves the config↔snapshot contract; ensure the thrown message
clearly references the config id and the surrounding context (example id missing
from sdkExampleById) so the failure is actionable.
In `@docs/ensnode.io/src/lib/examples/omnigraph/example-query.ts`:
- Line 13: The schema uses namespace: z.custom<DocsOmnigraphExampleNamespace>()
which provides no runtime checks; change it to a runtime-validated schema such
as namespace: z.enum([...]) or namespace: z.union([z.literal('ns1'),
z.literal('ns2')]) or, if dynamic, namespace:
z.custom<DocsOmnigraphExampleNamespace>((v) => /* predicate returning boolean
*/) so that .parse(...) will fail for invalid namespaces; update the schema
where the namespace field is defined (replace the z.custom call referencing
DocsOmnigraphExampleNamespace).
---
Outside diff comments:
In `@packages/ensnode-sdk/src/omnigraph-api/example-queries.ts`:
- Around line 650-669: The SKILL.md examples block is out of sync with the
canonical GRAPHQL_API_EXAMPLE_QUERIES in
packages/ensnode-sdk/src/omnigraph-api/example-queries.ts: update the AUTOGEN
examples in packages/ensskills/skills/omnigraph/SKILL.md to match the current
entries (replace the old "namegraph" example and add the new
"accelerate-resolve" example) by copying the examples (including queries, ids,
and variables) from GRAPHQL_API_EXAMPLE_QUERIES (look for the namegraph entry
around id: "namegraph" and the new accelerate-resolve entry) so the
documentation and source remain aligned.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 53687c37-27d8-4675-b8e4-08a841299416
📒 Files selected for processing (49)
docs/ensnode.io/config/integrations/starlight/sidebar-topics/integrate.tsdocs/ensnode.io/scripts/fetch-omnigraph-example-responses.mtsdocs/ensnode.io/scripts/snapshot-omnigraph-version.mtsdocs/ensnode.io/src/components/molecules/omnigraph-static-example/CurlStaticCodeExample.astrodocs/ensnode.io/src/components/molecules/omnigraph-static-example/GraphqlStaticQueryExample.astrodocs/ensnode.io/src/components/molecules/omnigraph-static-example/SdkStaticCodeExample.astrodocs/ensnode.io/src/components/molecules/omnigraph-static-example/StaticExampleActionBar.astrodocs/ensnode.io/src/components/molecules/omnigraph-static-example/StaticExampleOutputSection.astrodocs/ensnode.io/src/components/molecules/omnigraph-static-example/StaticExamplePlaygroundHint.astrodocs/ensnode.io/src/components/molecules/omnigraph-static-example/constants.tsdocs/ensnode.io/src/components/organisms/OmnigraphStaticExampleSet.astrodocs/ensnode.io/src/content/docs/docs/integrate/index.mdxdocs/ensnode.io/src/content/docs/docs/integrate/omnigraph/examples/account-events.mdxdocs/ensnode.io/src/content/docs/docs/integrate/omnigraph/examples/account-migrated-names.mdxdocs/ensnode.io/src/content/docs/docs/integrate/omnigraph/examples/account-primary-name.mdxdocs/ensnode.io/src/content/docs/docs/integrate/omnigraph/examples/account-resolver-permissions.mdxdocs/ensnode.io/src/content/docs/docs/integrate/omnigraph/examples/domain-events.mdxdocs/ensnode.io/src/content/docs/docs/integrate/omnigraph/examples/domain-profile.mdxdocs/ensnode.io/src/content/docs/docs/integrate/omnigraph/examples/domain-records.mdxdocs/ensnode.io/src/content/docs/docs/integrate/omnigraph/examples/domain-resolver.mdxdocs/ensnode.io/src/content/docs/docs/integrate/omnigraph/examples/domain-subdomains.mdxdocs/ensnode.io/src/content/docs/docs/integrate/omnigraph/examples/domains-by-address.mdxdocs/ensnode.io/src/content/docs/docs/integrate/omnigraph/examples/eth-by-version.mdxdocs/ensnode.io/src/content/docs/docs/integrate/omnigraph/examples/find-domains.mdxdocs/ensnode.io/src/content/docs/docs/integrate/omnigraph/examples/index.mdxdocs/ensnode.io/src/content/docs/docs/integrate/omnigraph/examples/namegraph.mdxdocs/ensnode.io/src/content/docs/docs/integrate/omnigraph/examples/permissions-by-contract.mdxdocs/ensnode.io/src/content/docs/docs/integrate/omnigraph/examples/permissions-by-user.mdxdocs/ensnode.io/src/content/docs/docs/integrate/omnigraph/examples/registry-domains.mdxdocs/ensnode.io/src/content/docs/docs/integrate/omnigraph/protocol-acceleration.mdxdocs/ensnode.io/src/data/omnigraph-examples/config.test.tsdocs/ensnode.io/src/data/omnigraph-examples/config.tsdocs/ensnode.io/src/data/omnigraph-examples/examples.jsondocs/ensnode.io/src/data/omnigraph-examples/examples.tsdocs/ensnode.io/src/data/omnigraph-examples/meta.tsdocs/ensnode.io/src/data/omnigraph-examples/responses.jsondocs/ensnode.io/src/data/omnigraph-examples/schema.graphqldocs/ensnode.io/src/data/omnigraph-examples/snapshot.jsondocs/ensnode.io/src/data/omnigraph-examples/types.tsdocs/ensnode.io/src/lib/examples/omnigraph/build-integration-snippets.test.tsdocs/ensnode.io/src/lib/examples/omnigraph/build-integration-snippets.tsdocs/ensnode.io/src/lib/examples/omnigraph/constants.tsdocs/ensnode.io/src/lib/examples/omnigraph/docs-utils.tsdocs/ensnode.io/src/lib/examples/omnigraph/example-query.tsdocs/ensnode.io/src/lib/examples/omnigraph/resolve-static-example.tsdocs/ensnode.io/src/lib/examples/stackblitz/static/buildProject.tsdocs/ensnode.io/src/lib/examples/stackblitz/static/resolveProject.tspackages/ensnode-sdk/src/omnigraph-api/example-queries.tspackages/ensskills/skills/omnigraph/SKILL.md
💤 Files with no reviewable changes (1)
- docs/ensnode.io/src/data/omnigraph-examples/meta.ts
|
@greptile review |
| @@ -1,3 +1,5 @@ | |||
| import { OMNIGRAPH_EXAMPLES_SIDEBAR_ITEMS } from "../../../../src/data/omnigraph-examples/config.ts"; | |||
There was a problem hiding this comment.
Would this work?
| import { OMNIGRAPH_EXAMPLES_SIDEBAR_ITEMS } from "../../../../src/data/omnigraph-examples/config.ts"; | |
| import { OMNIGRAPH_EXAMPLES_SIDEBAR_ITEMS } from "@data/omnigraph-examples/config.ts"; |
There was a problem hiding this comment.
I dont know why, if you know how to resolve it, feel free to push that commit :)
|
@greptile review |
Summary
resolve.profileobjectsnamegraphquery to be consistent with other namegraph query in docdomain-resolverquery to fit into 5 seconds per requestaccelerate-resolveexample query only for "accelerate" pagecURLexample, now dont includeEOFif it's possible (always possible for current examples)Why
Make docs even better
Testing
Notes for Reviewer (Optional)
Pre-Review Checklist (Blocking)