Correct(suggested) way to add new argument to find* resolvers
For backwards compatibility, we need to add a new argument to some of our default resolvers. Right now, out of the box, "LIMIT" is supported- Historically, we used "TAKE" for the same function. It would throttle the number of records returned.
What would the prescribed way to have "TAKE" also be avail to a findMany resolver, just passing the value to the resolver code in, executing the "LIMIT" function?
Try to wrap existed resolver. You need to add new arg, and in resolve method just pass args.take value to args.limit
Something like this: https://github.com/graphql-compose/graphql-compose-mongoose/blob/eecf9eab1b09b05f19ec67d24b7ccb35d06e00f8/src/tests/github_issues/136-test.js#L37-L49
Perfect...That was what we had. But thank you for the confirmation.