// Shop.stories.js
import Vue from 'vue'
import apolloStorybookDecorator from 'apollo-storybook-vue'
import { storiesOf } from '@storybook/vue'
import Cart from '../Cart'
import typeDefs from './schema/schema.graphql'
import mocks from './schema/mocks'
storiesOf('Shop/Cart', module)
.addDecorator(
apolloStorybookDecorator({
mocks,
typeDefs,
Vue
})
)
.add('Cart', () => {
return {
components: {
Cart
},
template: '<cart />'
}
})
Now, when I run storybook and open this component, I get the following errors / warnings:
Found @client directives in a query but no ApolloClient resolvers were specified. This means ApolloClient local resolver handling has been disabled, and @client directives will be passed through to your link chain.
I have the following vue component:
I would like to display it in my storybook. For that, I've defined a
schema.graphql
(the same as that of the production application):and mocks:
which I then wire up in my stories:
Now, when I run storybook and open this component, I get the following errors / warnings:
and
and
among others.
What can I do to make it work? The component works fine in the production application.