You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been testing, converting our schema to use it, and found few points not yet covered,
I'm fixing most of them and hope to submit a PR soon.
The biggest problem right now is to parse field args.
At the moment each kind (Type/Interface/Mutation/Query) handle the field/arg parsing; The code is replicated and using different listeners (which may add some boilerplate to the extension creator).
Also, some have few nuances (like not passing the types, interfaces reference to the listener), making harder to keep extension generic.
I propose create a generic Field/Arg class (similar to type/interface/etc) with a unified onGenerateField and onGenerateArg.
I think it'll simplify the code and avoid this kind of problem.
What do you think? There is a use case for kind-specific field//arg parser?
Can submit a PR with those changes if you find it interesting.
The text was updated successfully, but these errors were encountered:
Mmm, I think you're right. When I was developing the library, I didn't found any use cases where I would need this. But, if you have found some and you think that this approach can solve your problem, then go ahead. Send the PR, I would be very glad to accept it.
The only thing, as usual, is to make sure that all the tests are passing.
Great work in making the lib extensible.
I've been testing, converting our schema to use it, and found few points not yet covered,
I'm fixing most of them and hope to submit a PR soon.
The biggest problem right now is to parse field
args
.At the moment each kind (Type/Interface/Mutation/Query) handle the field/arg parsing; The code is replicated and using different listeners (which may add some boilerplate to the extension creator).
Also, some have few nuances (like not passing the
types
,interfaces
reference to the listener), making harder to keep extension generic.I propose create a generic
Field
/Arg
class (similar to type/interface/etc) with a unifiedonGenerateField
andonGenerateArg
.I think it'll simplify the code and avoid this kind of problem.
What do you think? There is a use case for kind-specific field//arg parser?
Can submit a PR with those changes if you find it interesting.
The text was updated successfully, but these errors were encountered: