Skip to content

Instantly share code, notes, and snippets.

@usulpro
Last active January 9, 2020 18:24
Show Gist options
  • Save usulpro/20629941fe634a2feb84196b614c25d3 to your computer and use it in GitHub Desktop.
Save usulpro/20629941fe634a2feb84196b614c25d3 to your computer and use it in GitHub Desktop.
// speakers.stories.js
import { QueryParams } from '@focusreactive/storybook-graphql-kit';
import { speakersQuery } from '../speaker.query';
export const speakers = ({ graphQlResponse: { result } }) => result.map(({ name, bio }) => (<div><h2>{name}</h2><p>{bio}</p></div>));
speakers.story = {
name: 'Conference Speakers',
parameters: QueryParams({
query,
vars: { conferenceTitle: 'React_Day_Berlin', eventYear: 'Y2019' },
searchVars: { name: '' },
viewId,
isConnected: true,
}),
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment