Hey team, I’ve got two PRs open against graphprotocol/docs that I think add real value, and I’d love to get them in front of a maintainer.
#1089 “Copy page” button for LLMs (open since Apr 1)
This adds a one-click “copy page as markdown” button so people can drop a docs page straight into an LLM. With how many devs now paste docs into Claude/ChatGPT to scaffold subgraphs and queries, this is a small change with an outsized DX win, and it lines up with where the docs are already heading (the /llms.txt direction). It’s been sitting ~7 weeks without a look.
main ← PaulieB14:feature/copy-for-llm
opened 02:31AM - 01 Apr 26 UTC
## What
Adds a **"Copy page"** button to the footer of every documentation page… , letting users copy the page's raw Markdown to their clipboard — ideal for pasting directly into LLMs like Claude or ChatGPT.
Inspired by Notion's "Copy for LLM" feature.
## How it works
- **Copy page** — fetches the raw `.mdx` source from GitHub and copies it to the clipboard as Markdown
- **View as Markdown ↗** — opens the raw GitHub file in a new tab
The button lives in `content.tsx` alongside the existing "Edit on GitHub" link, so it **automatically appears on all doc pages** without touching any individual `.mdx` files.
## Changes
| File | What changed |
|---|---|
| `website/src/components/CopyForLLM.tsx` | New component (button + dropdown) |
| `website/src/components/index.ts` | Export the new component |
| `website/src/layout/templates/default/content.tsx` | Derive `rawMarkdownUrl` and render `<CopyForLLM>` next to the edit link |
## Why this is useful
The Graph docs cover complex protocol concepts — subgraphs, indexing, query architecture, etc. Developers frequently paste doc pages into LLMs to ask follow-up questions. This button removes the friction of manually copying, and since the source is already Markdown, no conversion is needed.
## Screenshot / mockup
The button appears at the bottom of every page, to the left of "Edit on GitHub":
```
[last updated date] [Copy page ▾] [✎ Edit this page]
```
Clicking "Copy page" copies the full Markdown source. The dropdown also exposes "View as Markdown ↗" for a direct link to the raw file.
#1103 x402 Payment-Signature + payment-on-failure caveats (open since May 16)
This documents the v2 Payment-Signature header and the payment-on-failure edge cases for x402, which currently aren’t called out and have tripped people up. Heads up: there’s one checklist item I left open. Happy to close it out or adjust scope based on what reviewers want.
main ← PaulieB14:docs/x402-v2-header-and-allocations-caveat
opened 02:04AM - 16 May 26 UTC
## Summary
Two real footguns hitting agent integrators of the `/api/x402/...` e… ndpoints that aren't covered in the current guide:
### 1. Protocol version (v2 header)
The gateway implements **x402 v2** — payments must be sent in a `Payment-Signature` header, not v1's `X-PAYMENT`. Verified live against `gateway.thegraph.com/api/x402/subgraphs/id/5zvR82QoaXYFyDEKLZ9t6v9adgnptxYpKpSbxtgVENFV`:
- `X-PAYMENT: <base64>` → `402 Payment-Signature header is required`
- `Payment-Signature: <base64>` → `200 OK` with data
The current line _"Any x402 tooling that supports exact scheme will work with the gateway's x402 endpoints"_ is misleading for v1 SDKs, which sign correctly but still get 402'd. The added callout under **How It Works** points v1 users at `@graphprotocol/client-x402` or a v2-aware upgrade.
### 2. Payment-on-failure cases
USDC settles even when the gateway returns no usable data:
- **Zero active allocations.** Valid `subgraph_id` whose deployment has no indexer allocations returns `{"errors":[{"message":"subgraph not found: no allocations"}]}` with payment settled.
- **GraphQL errors.** Any response with `errors` (bad query shape, schema mismatch, etc.) is also settled.
Added a `## Caveats` section so agent integrators know to pre-check active allocations against the Graph Network Subgraph, and to validate query shape against `get_schema_by_subgraph_id` before paying. Both can be done cheaply / for free and avoid burning real USDC.
## Test plan
- [x] Live-tested `Payment-Signature` against four deployments (Uniswap V3 on ETH/Polygon/Arbitrum/Base) — all returned 200 + data after settlement; one returned errors after settlement (different schema variant), confirming the "errors still cost" point.
- [x] Reproduced "no allocations" against `QmWFi6uciaQPQmo1xRrahNwfiWLGeN9GTDJMuCfV8iVXSe` (Substreams Uniswap v3 Ethereum) — valid registry ID, no active indexers, $0.01 settled with no data.
- [ ] Reviewer to confirm wording matches Graph docs style.
Totally understand the review queue is long. If there’s a better channel or a specific reviewer I should tag for docs PRs, point me at it and I’ll route accordingly. Happy to rebase or revise either one to make the merge easy.
Thanks!