Open dnafication opened 2 years ago
It's a very annoying problem that results of the solution I opted for which was to define new scalars
I'm considering re-implemeting using the same approach I used in https://github.com/ephys/graphql-non-null-directive/blob/main/src/index.ts, by wrapping resolve
instead of creating new scalars.
I need to rewrite this library because graphql-tools 8 works very differently to graphql-tools 7. Will probably investigate the other approach then
@ephys Thanks, let me know if you end up with the newer approach. It would be really handy to introduce validation of argument definitions without creating new types.
First of all, great work building this. I have seen other libraries which are not maintained and doesn't work for ARGUMENT_DEFINITIONs. I've noticed a problem while using this with query variables. Example:
I have a query which looks like the following:
and variable:
Schema is decorated with
@int(min:1)
Error:
The problem seems to be happening as we are declaring the
limit
variable asInt
where as it was changed by the directive toConstrainedInt__min_1
. Do you know how to go about this? Changing the type of query variable toConstrainedInt__min_1
is not a viable solution.