peepshow/ how-to/ video-to-graphql

Reel #H-15 Drop a video, POST a GraphQL mutation

peepshow how-to / video-to-graphql

Send video runs to any GraphQL endpoint with peepshow

Got a GraphQL backend? peepshow's GraphQL sink posts each run as a typed mutation — frames as URLs or base64, transcript as a string, metadata as scalars. Use it to feed Hasura, PostGraphile, Apollo Router, AWS AppSync, or any custom GraphQL server.

Steps

  1. Install peepshow
    npm install -g peepshow
  2. 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 ...'
  3. 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 } }'
  4. Run with the sink
    peepshow ./demo.mp4 --sink graphql
  5. 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.

Works with these LLMs

Pairs with these sinks