Closed AndresPrez closed 2 years ago
Hey @chanind, thanks for taking a look at this. Ive fixed the lint issues and your suggestions as well.
:tada: This PR is included in version 3.1.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Hello @chanind, here's an extension proposal for the
FieldArgTypeRewriter
rewriter.This PR is backwards compatible.
New functionalities are included for the
FieldArgTypeRewriter
rewriter.fieldName now optional in case matchConditions are passed: Useful to avoid having to create a new rewriter for every field, as now the matching can be delegated to the matchConditions
coerceVariable function now receives context in second argument: Context includes all of query's variables and arguments, and very useful for coercion that needs the value of other argument values as in pagination coercion (e.g.,
[limit, offset]
to[pageSize, pageNumber]
)In-Query argument values can be coerced: _Now, there's the coerceArgumentValue that allows support when argument values come in the query document.
Unit Tests for new functionalities