---
collection: github-viewer
protocol: graphql
vault: keychain
env:
  prod: https://api.github.com/graphql
---

# GitHub — Viewer
> Identity smoke test over GraphQL. Auth: token with read:user.

## query viewer — who am I

**Request**
```graphql
query { viewer { login } }
```

**Checks**
- `status` == 200
- `.data.viewer.login` is a non-empty string

**Mock**
```json
{ "data": { "viewer": { "login": "octocat" } } }
```

**Notebook**
- ⚠️ caveat 2026-06-29 — live run deferred: no GitHub token stored yet (needs scope `read:user`). Fire recipe: POST to `{{env}}` with `Authorization: Bearer {{vault:GH_TOKEN}}` and body `{"query":"query { viewer { login } }"}`; Checks assert `.data.viewer.login`. Structure validated; state/outcome to be recorded on first live run.
