-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate automatic input and output schema detection in attach-query
and attach-mutation
#4
Comments
There is s/get-spec to retrieve the spec of a fully qualified symbol. It should contain |
@tolgraven started working on this issue via WorksHub. |
and WorksHub#11 (description support), both working but in need of tests eetc and especially design decisions before any further work.
A user started working on this issue via WorksHub. |
1 similar comment
A user started working on this issue via WorksHub. |
If you successfully complete this Issue via WorskHub there's a $25 reward available. |
ChallengeInvestigated this and there is a challenge: If users would always Another constraint we impose on the user is that their sepcs must be #40 Makes an erronous assumption in my analysis. The So in my opinion we would not be able to provide this sugar in a way I asked on slack and Alex Miller said there is currently not really a Alternative:There would be an alternative maybe in conjunction with #11 to check We could then have something like: (defn
^{:leona/query-spec ::test/driod-query
:leona/results-spec ::test/droid}
droid-resolver
[ctx query value]) This would be trivial to implement and I suppose nice for users that |
I do like the metadata approach. I wish this had been used more in the original design of Leona as well. |
Add query and mutation specs from resolver-fn metadata #4
It's theoretically possible to discern the schemas from the
fdef
(if one exists) rather than have the user supply schema.For example, instead of
(attach-query ::input ::output handler)
you could just do(attach-query handler)
and the function would find anfdef
associated withhandler
, detect the:args
and:ret
(thanks @devurandom) and use these in place of input and output specs.This is just sugar, really, but might help with onboarding
The text was updated successfully, but these errors were encountered: