A Fastify plugin that serves the Altair GraphQL client for interactive query development in Fastify v5+ applications. Version 8.5.7 is current, part of the Altair monorepo with active development. Key differentiators: zero-config setup, supports all Altair features including subscriptions and settings persistence, fully typed with TypeScript. Alternatives like GraphiQL or Playground require separate Express middleware adapters.
npm install altair-fastify-pluginNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Registers Altair GraphQL client in a Fastify server with custom base URL, GraphQL endpoint, WebSocket subscriptions endpoint, and initial query.
Upgrade Fastify to v5.x or use altair-fastify-plugin v7.x for Fastify v4.
Use dynamic import() in CommonJS projects or migrate to ES modules.
Use `initialSettings` instead.
Ensure app.register(altairFastify, ...) is called before your GraphQL route registration.
Change import to: import altairFastify from 'altair-fastify-plugin'
Run: npm install altair-fastify-plugin fastify@^5
Ensure app is created with Fastify() and register is awaited.