graphile-engine icon indicating copy to clipboard operation
graphile-engine copied to clipboard

Allow more specific `TArgs` types

Open blakepettersson opened this issue 4 years ago • 0 comments

Description

Allow types more specific than { [argName: string]: any } to be passed into makeWrapResolversPlugin. We now set TSource, TContext and TArgs as type parameters to makeWrapResolversPlugin which means we can optionally pass in types more narrow than the defaults.

This should be a backwards compatible change since we set the type defaults to be the same as in ResolverWrapperFn. Fixes #708.

Performance impact

Should be zero.

Security impact

Should be zero.

Checklist

  • [x] My code matches the project's code style and yarn lint:fix passes.
  • [ ] I've added tests for the new feature, and yarn test passes.
  • [ ] I have detailed the new feature in the relevant documentation.
  • [ ] I have added this feature to 'Pending' in the RELEASE_NOTES.md file (if one exists).
  • [ ] If this is a breaking change I've explained why.

blakepettersson avatar Jan 26 '21 09:01 blakepettersson