Skip to content

Is snake_case_fallback_resolvers or fallback_resolvers being used by default implicitly? #917

Answered by rafalp
Q-back asked this question in Q&A
Discussion options

You must be logged in to vote

Does Ariadne use snake_case_fallback_resolvers or fallback_resolvers for all the fields that doesn't have custom (written by user) resolver attached yet?

Neither. When there's no resolver set on field on GraphQL schema, query executor falls back to default resolver which (AFAIR) checks if object is dict and then tries either obj.getattr(field_name) or obj.get(field_name). What snake_case_fallback_resolvers and fallback_resolvers do is they scan schema for fields without set resolvers and set custom resolver for them. Ariadne's custom default resolvers are different in behavior than default one provided by graphql-core.

If you pass snake_case_fallback_resolvers before user to make_execut…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Q-back
Comment options

Answer selected by Q-back
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants