Skip to main content

Documentation Index

Fetch the complete documentation index at: https://rockboxzig.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

The GraphQL server is the best fit for UIs: typed schema, batched queries, and a track:changed / status:changed / playlist:changed subscription stream over WebSocket.
  • Endpointhttp://localhost:6062/graphql
  • WebSocketws://localhost:6062/graphql (graphql-ws protocol)
  • GraphiQLhttp://localhost:6062/graphiql
The schema is generated from crates/graphql/ and served by Juniper. All client SDKs in SDKs wrap this transport.

Quick examples

query NowPlaying {
  currentTrack {
    title
    artist
    album
    elapsed
    length
  }
  playbackStatus { status }
}

Subscriptions

Three subscriptions are exposed:
SubscriptionPayloadFires when
trackTrackThe currently playing track changes
playbackStatusAudioStatus { status: Int }Stopped/playing/paused changes
playlistPlaylistThe live queue is mutated
All three are pushed by the broker loop in crates/server/src/lib.rs:start_broker().

Connecting from a browser

import { RockboxClient } from '@rockbox-zig/sdk';

const client = new RockboxClient();
client.connect();

client.on('track:changed', (t) => {
  document.title = `${t.title}${t.artist}`;
});
For language-specific guides, see SDKs.

Schema introspection

GraphiQL ships pre-installed at http://localhost:6062/graphiql — every type, every field, every argument. You can also dump the schema directly:
npx graphql-cli get-schema -e http://localhost:6062/graphql > schema.graphql