apollo-storybook-decorator icon indicating copy to clipboard operation
apollo-storybook-decorator copied to clipboard

Add 'addTypeName={false}' support

Open robinelvin opened this issue 6 years ago • 1 comments

I may be doing something wrong or I've missed something in the documentation but when passing back mocked data through a nested Mutation component the objects have a __typename: "<type>" property and therefore do not match the schema.

As mentioned here the addTypeName option of the Apollo MockedProvider allows you to turn off the typename annotations. Is this possible to do with apollo-storybook-decorator?

robinelvin avatar Dec 19 '18 21:12 robinelvin

hi @robinelvin, looks like we are defaulting to true here https://github.com/abhiaiyer91/apollo-storybook-decorator/blob/master/packages/apollo-storybook-core/src/index.js#L81

We can make this configurable. PRs are welcome!!

abhiaiyer91 avatar Dec 19 '18 21:12 abhiaiyer91