Hi,
I find it really hard to find the function signature for the resolve functions. I cannot find it in the API documentation and in all the samples the arguments are given as _. If someone can point me at the right documentation I will set up a pull request for the documentation (even _parent instead of _ will help). So it will be easier for the next newcomer :)
For the rest the lib is awesome, replacing a previous API with graphQL and code dissolves!
Hi @jfrolich,
You can find more information around field resolution function here (See custom resolution):
However it does not document the arity 3 resolution function which has been introduced with 1.2:
https://github.com/absinthe-graphql/absinthe/blob/master/CHANGELOG.md#resolution-functions
Also looking at the typespec, I dont think it has been updated to reflect the arity 3 resolution function either:
https://github.com/absinthe-graphql/absinthe/blob/v1.2.1/lib/absinthe/type/field.ex#L23
Good catch, thanks! We'll update it to include the 3 arity information.
Cool 馃憦
Spotted this one that also would need to be updated:
https://github.com/absinthe-graphql/absinthe/blob/master/lib/absinthe/schema/notation.ex#L343
Anyone feel like making a PR? :D I can deal with it later today if not.
Fixed in master.
I'm still having issues finding out what the parameters of the resolve function are. Where exactly should I be looking?
@dideler I believe this is what you're look for:
https://hexdocs.pm/absinthe/Absinthe.Schema.Notation.html#resolve/1
Most helpful comment
Hi @jfrolich,
You can find more information around field resolution function here (See custom resolution):
However it does not document the arity 3 resolution function which has been introduced with 1.2:
Also looking at the typespec, I dont think it has been updated to reflect the arity 3 resolution function either: