Apollo Storybook Decorator

screenshot of Apollo Storybook Decorator
angular
react
vue

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

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.
angular
Angular

Angular is a TypeScript-based open-source framework by Google for building dynamic single-page applications and cross-platform mobile apps with MVC architecture and a rich set of features.

react
React

React is a widely used JavaScript library for building user interfaces and single-page applications. It follows a component-based architecture and uses a virtual DOM to efficiently update and render UI components

vue
Vue

Vue.js is a lightweight and flexible JavaScript framework that allows developers to easily build dynamic and reactive user interfaces. Its intuitive syntax, modular architecture, and focus on performance make it a popular choice for modern web development.

eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.

graphql
Graphql

A website that uses GraphQL as a query language to manage data fetching and state management. This includes features such as a strongly typed schema, client-side caching, and declarative data fetching to streamline data management and optimize website performance.

Storybook

Storybook is a tool for developing and testing UI components in isolation. It provides a sandbox environment where you can experiment with different props and states to see how your component responds.