You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having stable and predictable values of mocked scalars allowed me to write tests where I check how different queries interact with each other via apollo cache (merging/overwriting results).
With v8 mocks do not have access to resolver info and context, and resolvers do not resolve scalars.
Any ideas on how I can rewrite this behavior with v8?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I used this code below to generate mock scalars with stable values. It worked well with
@graphql-tools/mock
v7:This way I was able to generate mocked data where each object type has stable and predictable field values, for example:
Having stable and predictable values of mocked scalars allowed me to write tests where I check how different queries interact with each other via apollo cache (merging/overwriting results).
With v8
mocks
do not have access to resolver info and context, andresolvers
do not resolve scalars.Any ideas on how I can rewrite this behavior with v8?
Beta Was this translation helpful? Give feedback.
All reactions