Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions docs/ensnode.io/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,22 @@ export default defineConfig({
"/ensnode": "/docs/integrate",
"/ensnode/deploying/railway": "/docs/services/ensrainbow/deploying/railway",
"/ensnode/concepts/what-is-the-ens-subgraph":
"/docs/reference/subgraph-legacy/what-is-the-ens-subgraph",
"/docs/reference/what-is-the-ens-subgraph":
"/docs/reference/subgraph-legacy/what-is-the-ens-subgraph",
"/docs/reference/querying-best-practices":
"/docs/reference/subgraph-legacy/querying-best-practices",
"/docs/integrate/subgraph/what-is-the-ens-subgraph",
"/docs/reference/what-is-the-ens-subgraph": "/docs/integrate/subgraph/what-is-the-ens-subgraph",
"/docs/reference/querying-best-practices": "/docs/integrate/subgraph/querying-best-practices",
Comment thread
shrugs marked this conversation as resolved.
"/docs/reference/subgraph-compatibility-tooling":
"/docs/reference/subgraph-legacy/subgraph-compatibility-tooling",
"/docs/integrate/subgraph/subgraph-compatibility-tooling",
"/docs/reference/subgraph-legacy/what-is-the-ens-subgraph":
"/docs/integrate/subgraph/what-is-the-ens-subgraph",
"/docs/reference/subgraph-legacy/subgraph-api": "/docs/integrate/subgraph/subgraph-api",
"/docs/reference/subgraph-legacy/querying-best-practices":
"/docs/integrate/subgraph/querying-best-practices",
"/docs/reference/subgraph-legacy/subgraph-compatibility-tooling":
"/docs/integrate/subgraph/subgraph-compatibility-tooling",
"/docs/reference/subgraph-legacy/with-ensjs": "/docs/integrate/subgraph/with-ensjs",
"/docs/reference/subgraph-legacy/with-viem": "/docs/integrate/subgraph/with-viem",
"/docs/reference/subgraph-legacy/subgraph-dependents":
"/docs/integrate/subgraph/subgraph-dependents",
"/ensadmin": "/docs/services/ensadmin",
"/ensapi": "/docs/services/ensapi",
"/ensdb": "/docs/services/ensdb",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const integrateSidebarTopic = {
collapsed: false,
badge: {
text: "NEW",
variant: "tip",
variant: "success",
},
items: [
{
Expand Down Expand Up @@ -91,6 +91,84 @@ export const integrateSidebarTopic = {
},
],
},
{
label: "ENS Unigraph SQL",
collapsed: false,
badge: {
text: "NEW",
variant: "success",
},
items: [
{
label: "Overview",
link: "/docs/integrate/unigraph",
},
{
label: "Examples",
collapsed: true,
items: [
{
label: "Overview",
link: "/docs/integrate/unigraph/examples",
},
{
label: "Domain by Name",
link: "/docs/integrate/unigraph/examples/domain-by-name",
},
{
label: "Account Domains",
link: "/docs/integrate/unigraph/examples/account-domains",
},
{
label: "Indexing Status",
link: "/docs/integrate/unigraph/examples/indexing-status",
},
],
},
{
label: "Schema Reference",
link: "/docs/integrate/unigraph/schema-reference",
},
],
},
{
label: "ENS Subgraph",
collapsed: true,
badge: {
text: "LEGACY",
variant: "danger",
},
items: [
{
label: "Overview",
link: "/docs/integrate/subgraph/what-is-the-ens-subgraph",
},
{
label: "Subgraph API",
link: "/docs/integrate/subgraph/subgraph-api",
},
{
label: "Querying Best Practices",
link: "/docs/integrate/subgraph/querying-best-practices",
},
{
label: "Subgraph Compatibility Tooling",
link: "/docs/integrate/subgraph/subgraph-compatibility-tooling",
},
{
label: "With ENSjs",
link: "/docs/integrate/subgraph/with-ensjs",
},
{
label: "With Viem",
link: "/docs/integrate/subgraph/with-viem",
},
{
label: "Subgraph Dependents",
link: "/docs/integrate/subgraph/subgraph-dependents",
},
],
},
{
label: "Integration Options",
collapsed: false,
Expand All @@ -100,30 +178,30 @@ export const integrateSidebarTopic = {
link: "/docs/integrate/integration-options",
},
{
label: "enskit (React)",
label: "enssdk (TypeScript)",
collapsed: false,
items: [
{
label: "Overview",
link: "/docs/integrate/integration-options/enskit",
link: "/docs/integrate/integration-options/enssdk",
},
{
label: "Interactive example ⚡",
link: "/docs/integrate/integration-options/enskit/example",
link: "/docs/integrate/integration-options/enssdk/example",
},
],
},
{
label: "enssdk (TypeScript)",
label: "enskit (React)",
collapsed: false,
items: [
{
label: "Overview",
link: "/docs/integrate/integration-options/enssdk",
link: "/docs/integrate/integration-options/enskit",
},
{
label: "Interactive example ⚡",
link: "/docs/integrate/integration-options/enssdk/example",
link: "/docs/integrate/integration-options/enskit/example",
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,6 @@ export const referenceSidebarTopic = {
label: "Terminology",
link: "/docs/reference/terminology",
},
{
label: "Subgraph API (Legacy)",
collapsed: true,
items: [
{
label: "What is the ENS Subgraph?",
link: "/docs/reference/subgraph-legacy/what-is-the-ens-subgraph",
},
{
label: "Subgraph API",
link: "/docs/reference/subgraph-legacy/subgraph-api",
},
{
label: "Querying Best Practices",
link: "/docs/reference/subgraph-legacy/querying-best-practices",
},
{
label: "Subgraph Compatibility Tooling",
link: "/docs/reference/subgraph-legacy/subgraph-compatibility-tooling",
},
{
label: "With ENSjs",
link: "/docs/reference/subgraph-legacy/with-ensjs",
},
{
label: "With Viem",
link: "/docs/reference/subgraph-legacy/with-viem",
},
{
label: "Subgraph Dependents",
link: "/docs/reference/subgraph-legacy/subgraph-dependents",
},
],
},
{
label: "Contributing",
collapsed: false,
Expand Down
51 changes: 0 additions & 51 deletions docs/ensnode.io/src/components/organisms/ExampleCard.astro

This file was deleted.

12 changes: 0 additions & 12 deletions docs/ensnode.io/src/content.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,6 @@ import { z } from "astro/zod";
import { docsLoader } from "@astrojs/starlight/loaders";
import { docsSchema } from "@astrojs/starlight/schema";

import { exampleQuerySchema, savedQueries } from "./data/ens-v1-examples-queries";

const examples = defineCollection({
loader: () =>
savedQueries.map((query) => ({
...query,
id: query.id,
})),
schema: exampleQuerySchema,
});

export const collections = {
docs: defineCollection({
loader: docsLoader(),
Expand All @@ -24,5 +13,4 @@ export const collections = {
}),
}),
}),
examples,
};
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { LinkCard, Aside } from "@astrojs/starlight/components";
Full access to ENS data formerly required two separate data fetching strategies working in parallel:

1. **ENS resolution** — RPC calls with CCIP-read support for offchain data (e.g. via a popular package such as `viem` or `wagmi`) to perform forward or reverse ENS resolution.
2. **Indexed ENS data** — the [ENS Subgraph](/docs/reference/subgraph-legacy/what-is-the-ens-subgraph) for indexed ENS data, such as discovering names owned by an address and all other ENS state outside of ENS resolutions.
2. **Indexed ENS data** — the [ENS Subgraph](/docs/integrate/subgraph/what-is-the-ens-subgraph) for indexed ENS data, such as discovering names owned by an address and all other ENS state outside of ENS resolutions.

Neither system alone was complete.
- ENS resolution gives you resolver records, but no access to all the other state about ENS! ENS Resolutions as exposed through popular libraries such as `viem` and `wagmi` are also painfully "close to the metal", putting the burden on app developers to learn and carefully implement complex details about interpreting raw values returned by the ENS protocol.
Expand Down
92 changes: 46 additions & 46 deletions docs/ensnode.io/src/content/docs/docs/integrate/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,51 @@ ENSNode supports a full range of different integration options across the stack,

Here's a summary of some popular integration strategies:

### 1. `enskit` + Omnigraph
### 1. `enssdk` + Omnigraph

With `enssdk`, leverage ENSNode and the Omnigraph from any JavaScript runtime to power your frontend or backend apps. `enssdk` comes with built-in type-safety and editor autocomplete for Omnigraph queries.

<HostedInstanceSdkVersionWarning for="enssdk" />


```ts
// create and extend an EnsNodeClient with Omnigraph API support
const client = createEnsNodeClient({ url: process.env.ENSNODE_URL! }).extend(omnigraph);

// this is fully typechecked and supports editor autocomplete!
const HelloWorldQuery = graphql(`
query HelloWorld {
domain(by: { name: "eth" }) {
id
canonical { name { interpreted } }
owner { address }
}
}
`);

// `result` is fully typed!
const result = await client.omnigraph.query({ query: HelloWorldQuery });
```

<LinkCard
title='Full enssdk Integration Documentation'
href="/docs/integrate/integration-options/enssdk"
/>

<LinkCard
title="enssdk-example app"
description='Check out our enssdk-example for a full example app.'
href="https://github.com/namehash/ensnode/tree/main/examples/enssdk-example"
/>


<LinkCard
title="Interactive enssdk example ⚡"
description="Edit and run the enssdk-example script in your browser."
href="/docs/integrate/integration-options/enssdk/example"
/>

### 2. `enskit` + Omnigraph

With `enskit`, leverage ENSNode and the Omnigraph to power your React components using `useOmnigraphQuery`. `enskit` comes with built-in type-safety, Omnigraph-specific cache directives, easy infinite pagination, and much much more.

Expand Down Expand Up @@ -137,50 +181,6 @@ export function RenderDomainAndSubdomains({ name }: { name: InterpretedName }) {
href="/docs/integrate/integration-options/enskit/example"
/>

### 2. `enssdk` + Omnigraph

With `enssdk`, leverage ENSNode and the Omnigraph from any JavaScript runtime to power your frontend or backend apps. `enssdk` comes with built-in type-safety and editor autocomplete for Omnigraph queries.

<HostedInstanceSdkVersionWarning for="enssdk" />


```ts
// create and extend an EnsNodeClient with Omnigraph API support
const client = createEnsNodeClient({ url: process.env.ENSNODE_URL! }).extend(omnigraph);

// this is fully typechecked and supports editor autocomplete!
const HelloWorldQuery = graphql(`
query HelloWorld {
domain(by: { name: "eth" }) {
id
canonical { name { interpreted } }
owner { address }
}
}
`);

// `result` is fully typed!
const result = await client.omnigraph.query({ query: HelloWorldQuery });
```

<LinkCard
title='Full enssdk Integration Documentation'
href="/docs/integrate/integration-options/enssdk"
/>

<LinkCard
title="enssdk-example app"
description='Check out our enssdk-example for a full example app.'
href="https://github.com/namehash/ensnode/tree/main/examples/enssdk-example"
/>


<LinkCard
title="Interactive enssdk example ⚡"
description="Edit and run the enssdk-example script in your browser."
href="/docs/integrate/integration-options/enssdk/example"
/>

### 3. ENS Omnigraph GraphQL API

The ENS Omnigraph API is a GraphQL API following the Relay specification, so you get built-in support for efficient infinite pagination and idiomatic access to all of the ENS protocol within a _unified_ ENSv1 + ENSv2 datamodel.
Expand All @@ -200,7 +200,7 @@ The ENS Omnigraph API is a GraphQL API following the Relay specification, so you

### 4. Further Integration Options

Beyond `enskit`, `enssdk`, and the Omnigraph GraphQL API, ENSNode exposes a deeper set of integration surfaces for advanced use cases:
Beyond `enssdk`, `enskit`, and the Omnigraph GraphQL API, ENSNode exposes a deeper set of integration surfaces for advanced use cases:

- **ENSDb** — query the indexed ENS dataset directly over Postgres for custom analytics or your own service layer.
- **enscli** — (coming soon) script ENSNode operations from the command line.
Expand Down
Loading
Loading