using addMocksToSchema
's mocks
prop no longer works for arrays
#8754
Unanswered
RadomirNowak
asked this question in
Q&A
Replies: 1 comment
-
Please create an issue with a reproduction by following our bug report template; |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi
Recently I've been trying to upgrade a few graphql-codegen libraries. I've been using
addMockFunctionsToSchema
(nowaddMocksToSchema
) to setup mocks for each cypress test that I'm running like so:After upgrading and making quite a lot changes it seems like now the returned mocked data does not work with arrays. As a response to my graphql query I get all the mocked values except for the
tags
property which is null. If I remove the property altogether, I get randomly generated values. What I would like is to get same data returned to me and only fields that are not specified to be randomly generated.It seems like one of the versions between my old one and new one has broken the functionality of
mocks
property.Can you point me how can I debug it further to understand if there's something that I need to change or is it maybe a bug in the library itself?
Thanks
Below are packages that I upgraded:
From:
To:
Beta Was this translation helpful? Give feedback.
All reactions