Skip to content

Commit c7fb035

Browse files
Merge pull request #664 from midnightntwrk/docs/graphql-schema
docs: auto generate docs for Indexer Graphql schema
2 parents 9f67ce7 + 340887f commit c7fb035

File tree

84 files changed

+7245
-18
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+7245
-18
lines changed

api-reference/midnight-indexer/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Midnight Indexer API documentation v3
1+
# Midnight Indexer API v3
22

33
The Midnight Indexer API exposes a GraphQL API that enables clients to query and subscribe to blockchain data—blocks, transactions, contracts, DUST generation, and shielded/unshielded transaction events—indexed from the Midnight blockchain. These capabilities facilitate both historical lookups and real-time monitoring.
44

api-reference/midnight-indexer/_category_.yaml

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
id: schema
3+
slug: /midnight-indexer
4+
title: Schema Documentation
5+
sidebar_position: 1
6+
hide_table_of_contents: true
7+
pagination_next: null
8+
pagination_prev: null
9+
sidebar_class_name: navbar__toggle
10+
---
11+
12+
This documentation has been automatically generated from the GraphQL schema.
13+
14+
Use the docs in the sidebar to find out how to use the schema:
15+
16+
- **Allowed operations**: queries and mutations.
17+
- **Schema-defined types**: scalars, objects, enums, interfaces, unions, and input objects.
18+
19+
<small>
20+
<i>Generated on 2/26/2026, 6:06:48 PM.</i>
21+
</small>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
label: Operations
2+
position: 1
3+
className: graphql-markdown-api-section
4+
link: null
5+
collapsible: false
6+
collapsed: false
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
label: Directives
2+
position: 1
3+
link: null
4+
collapsible: true
5+
collapsed: true
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
id: include
3+
title: include
4+
---
5+
6+
export const Bullet = () => (
7+
<>
8+
<span
9+
style={{
10+
fontWeight: "normal",
11+
fontSize: ".5em",
12+
color: "var(--ifm-color-secondary-darkest)"
13+
}}
14+
>
15+
&nbsp;&nbsp;
16+
</span>
17+
</>
18+
);
19+
20+
export const SpecifiedBy = (props) => (
21+
<>
22+
Specification
23+
<a
24+
className="link"
25+
style={{ fontSize: "1.5em", paddingLeft: "4px" }}
26+
target="_blank"
27+
href={props.url}
28+
title={"Specified by " + props.url}
29+
>
30+
31+
</a>
32+
</>
33+
);
34+
35+
export const Badge = (props) => (
36+
<>
37+
<span className={props.class}>{props.text}</span>
38+
</>
39+
);
40+
41+
import { useState } from "react";
42+
43+
export const Details = ({
44+
dataOpen,
45+
dataClose,
46+
children,
47+
startOpen = false
48+
}) => {
49+
const [open, setOpen] = useState(startOpen);
50+
return (
51+
<details
52+
{...(open ? { open: true } : {})}
53+
className="details"
54+
style={{
55+
border: "none",
56+
boxShadow: "none",
57+
background: "var(--ifm-background-color)"
58+
}}
59+
>
60+
<summary
61+
onClick={(e) => {
62+
e.preventDefault();
63+
setOpen((open) => !open);
64+
}}
65+
style={{ listStyle: "none" }}
66+
>
67+
{open ? dataOpen : dataClose}
68+
</summary>
69+
{open && children}
70+
</details>
71+
);
72+
};
73+
74+
Directs the executor to include this field or fragment only when the `if` argument is true.
75+
76+
```graphql
77+
directive @include(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
78+
```
79+
80+
### Arguments
81+
82+
#### [<code style={{ fontWeight: 'normal' }}>include.<b>if</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>Boolean!</b></code>](api-reference/midnight-indexer/types/scalars/boolean.mdx) <Badge class="badge badge--secondary badge--non_null" text="non-null"/> <Badge class="badge badge--secondary " text="scalar"/>
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
id: skip
3+
title: skip
4+
---
5+
6+
export const Bullet = () => (
7+
<>
8+
<span
9+
style={{
10+
fontWeight: "normal",
11+
fontSize: ".5em",
12+
color: "var(--ifm-color-secondary-darkest)"
13+
}}
14+
>
15+
&nbsp;&nbsp;
16+
</span>
17+
</>
18+
);
19+
20+
export const SpecifiedBy = (props) => (
21+
<>
22+
Specification
23+
<a
24+
className="link"
25+
style={{ fontSize: "1.5em", paddingLeft: "4px" }}
26+
target="_blank"
27+
href={props.url}
28+
title={"Specified by " + props.url}
29+
>
30+
31+
</a>
32+
</>
33+
);
34+
35+
export const Badge = (props) => (
36+
<>
37+
<span className={props.class}>{props.text}</span>
38+
</>
39+
);
40+
41+
import { useState } from "react";
42+
43+
export const Details = ({
44+
dataOpen,
45+
dataClose,
46+
children,
47+
startOpen = false
48+
}) => {
49+
const [open, setOpen] = useState(startOpen);
50+
return (
51+
<details
52+
{...(open ? { open: true } : {})}
53+
className="details"
54+
style={{
55+
border: "none",
56+
boxShadow: "none",
57+
background: "var(--ifm-background-color)"
58+
}}
59+
>
60+
<summary
61+
onClick={(e) => {
62+
e.preventDefault();
63+
setOpen((open) => !open);
64+
}}
65+
style={{ listStyle: "none" }}
66+
>
67+
{open ? dataOpen : dataClose}
68+
</summary>
69+
{open && children}
70+
</details>
71+
);
72+
};
73+
74+
Directs the executor to skip this field or fragment when the `if` argument is true.
75+
76+
```graphql
77+
directive @skip(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
78+
```
79+
80+
### Arguments
81+
82+
#### [<code style={{ fontWeight: 'normal' }}>skip.<b>if</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>Boolean!</b></code>](api-reference/midnight-indexer/types/scalars/boolean.mdx) <Badge class="badge badge--secondary badge--non_null" text="non-null"/> <Badge class="badge badge--secondary " text="scalar"/>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
label: Mutations
2+
position: 5
3+
link: null
4+
collapsible: true
5+
collapsed: true
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
id: connect
3+
title: connect
4+
---
5+
6+
export const Bullet = () => (
7+
<>
8+
<span
9+
style={{
10+
fontWeight: "normal",
11+
fontSize: ".5em",
12+
color: "var(--ifm-color-secondary-darkest)"
13+
}}
14+
>
15+
&nbsp;&nbsp;
16+
</span>
17+
</>
18+
);
19+
20+
export const SpecifiedBy = (props) => (
21+
<>
22+
Specification
23+
<a
24+
className="link"
25+
style={{ fontSize: "1.5em", paddingLeft: "4px" }}
26+
target="_blank"
27+
href={props.url}
28+
title={"Specified by " + props.url}
29+
>
30+
31+
</a>
32+
</>
33+
);
34+
35+
export const Badge = (props) => (
36+
<>
37+
<span className={props.class}>{props.text}</span>
38+
</>
39+
);
40+
41+
import { useState } from "react";
42+
43+
export const Details = ({
44+
dataOpen,
45+
dataClose,
46+
children,
47+
startOpen = false
48+
}) => {
49+
const [open, setOpen] = useState(startOpen);
50+
return (
51+
<details
52+
{...(open ? { open: true } : {})}
53+
className="details"
54+
style={{
55+
border: "none",
56+
boxShadow: "none",
57+
background: "var(--ifm-background-color)"
58+
}}
59+
>
60+
<summary
61+
onClick={(e) => {
62+
e.preventDefault();
63+
setOpen((open) => !open);
64+
}}
65+
style={{ listStyle: "none" }}
66+
>
67+
{open ? dataOpen : dataClose}
68+
</summary>
69+
{open && children}
70+
</details>
71+
);
72+
};
73+
74+
Connect the wallet with the given viewing key and return a session ID.
75+
76+
```graphql
77+
connect(
78+
viewingKey: ViewingKey!
79+
): HexEncoded!
80+
```
81+
82+
### Arguments
83+
84+
#### [<code style={{ fontWeight: 'normal' }}>connect.<b>viewingKey</b></code>](#)<Bullet />[<code style={{ fontWeight: 'normal' }}><b>ViewingKey!</b></code>](api-reference/midnight-indexer/types/scalars/viewing-key.mdx) <Badge class="badge badge--secondary badge--non_null" text="non-null"/> <Badge class="badge badge--secondary " text="scalar"/>
85+
86+
### Type
87+
88+
#### [<code style={{ fontWeight: 'normal' }}><b>HexEncoded</b></code>](api-reference/midnight-indexer/types/scalars/hex-encoded.mdx) <Badge class="badge badge--secondary " text="scalar"/>

0 commit comments

Comments
 (0)