-
I'm working on upgrading our codebase from v7 to v8 of graphql-tools/mock. We use some mocks that use the passed in arguments to return different data. Following the guide on https://www.graphql-tools.com/docs/mocking#breaking-change-mock-functions-signature, I moved our custom argument-using mocks into the resolvers argument. Interestingly, while the top-level resolver received the arguments as documented (with the passed params as the second argument), if that resolver then returns any resolver functions deeper in the tree which also need access to their own parameters, those inner resolvers then seem to receive their arguments as the first parameter, rather than the second. I may be misunderstanding how |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I believe this is actually just consistent with upstream graphql JS where embedded inner resolver functions receive args as first parameter with parent set as ‘this’ |
Beta Was this translation helpful? Give feedback.
I believe this is actually just consistent with upstream graphql JS where embedded inner resolver functions receive args as first parameter with parent set as ‘this’