Steps
- Install peepshow
npm install -g peepshow - Set the GraphQL endpoint + auth
Headers via env — Bearer, API key, whatever your server expects.
export GRAPHQL_URL=https://api.example.com/graphql export GRAPHQL_HEADERS='Authorization: Bearer ...' - Provide the mutation template
Variables substituted from the peepshow run manifest. Default mutation works for Hasura-style auto-schemas; override for custom shapes.
export GRAPHQL_MUTATION='mutation ($run: peepshow_runs_insert_input!) { insert_peepshow_runs_one(object: $run) { id } }' - Run with the sink
peepshow ./demo.mp4 --sink graphql - Make it automatic
peepshow sinks add graphql
Why it works
GraphQL endpoints are everywhere — Hasura on Postgres, PostGraphile, Apollo Federation, AWS AppSync, custom Node / Rails / Go servers. The Webhook sink can post anywhere but doesn't know your schema. peepshow's GraphQL sink posts a typed mutation with variables pulled from the run manifest, so it slots straight into your existing types without a separate adapter.
When it helps
- Teams already running Hasura / PostGraphile on top of Postgres — peepshow becomes one more mutation source.
- Apollo Federation deployments where peepshow runs feed a `media` subgraph.
- AppSync APIs where mobile / web clients query the same dataset peepshow writes to.
Pitfalls
- Default mutation expects a Hasura-style insert; for custom schemas, set `GRAPHQL_MUTATION` to your shape.
- Frame URLs need a public host — pair with the S3 sink or set `PEEPSHOW_FRAME_BASE_URL` to point at your asset CDN.
- Authentication is per-request — peepshow respects `GRAPHQL_HEADERS` line-by-line.