Make the overrides optional
ertrzyiks opened this issue · 4 comments
ertrzyiks commented
Currently the overrides props
param is required
export function createQueryMock(props: Partial<Query>)
which means that even if we don't want any specific field value to be override we still need to pass an empty object
createBlogListQueryQueryMock() // invalid
createBlogListQueryQueryMock({}) // valid
I suggest to add a default param for convenience:
export function createQueryMock(props: Partial<Query> = {})
zhouzi commented
Agreed, that would make up for a better experience 👍 Would you be interested in adding that to the schema plugin? I am currently working on fixing a few issues with the operations plugin in #45 so I can add it to that plugin there.
ertrzyiks commented
I can work on a PR to add it to the schema plugin
zhouzi commented