Skip to content

Instantly share code, notes, and snippets.

@usulpro
Last active January 13, 2020 22:02
Show Gist options
  • Save usulpro/235468ffc5e0bc3a738adea4af89b66a to your computer and use it in GitHub Desktop.
Save usulpro/235468ffc5e0bc3a738adea4af89b66a 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 = Query({
name: 'Conference Speakers',
story: ({ graphQlResponse: { result } }) => result.map(({ name, bio }) => (<div><h2>{name}</h2><p>{bio}</p></div>)),
query,
vars: { conferenceTitle: 'React_Day_Berlin', eventYear: 'Y2019' },
searchVars: { name: '' },
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment