More Premium Hugo Themes Premium React Themes

Apollo Storybook Decorator

Wrap your storybook environment with Apollo Client, provide mocks for isolated UI testing with GraphQL

Apollo Storybook Decorator

Wrap your storybook environment with Apollo Client, provide mocks for isolated UI testing with GraphQL

Author Avatar Theme by abhiaiyer91
Github Stars Github Stars: 331
Last Commit Last Commit: Jan 29, 2020 -
First Commit Created: Aug 8, 2025 -
Apollo Storybook Decorator screenshot

Overview

The Apollo Storybook Decorator is a versatile tool designed to enhance the development experience when working with GraphQL and various frontend frameworks. It facilitates seamless integration of GraphQL within your Storybook stories, enabling you to easily mock and visualize component states depending on your GraphQL queries and mutations. This decorator is a significant asset for developers using Apollo Client, yielding improved efficiency in building and testing components.

Whether you are utilizing React, React Native, Vue, or Angular, this decorator simplifies the setup, allowing you to focus more on creating stunning user interfaces.

Features

  • Framework Compatibility: Supports multiple frameworks, including React, React Native, Vue, and Angular, allowing for a broad range of applications.
  • GraphQL Type Definitions: Easily provide GraphQL type definitions to the decorator, simplifying the interaction with your data.
  • Mocking Capabilities: Leverage mock objects similar to GraphQL tools, streamlining the process of simulating GraphQL interactions in your stories.
  • Configuration Options: Customize options such as resolverValidationOptions to suit your specific requirements, enhancing flexibility.
  • Ease of Integration: Simple to add the decorator on a per-story basis or globally in your Storybook configuration, making setup a breeze.
  • Lerna Monorepo Structure: Organized in a lerna monorepo, ensuring that managing dependencies and versions is straightforward.
  • Active Development: Regular updates and community support ensure the implementation remains relevant and reliable across projects.