-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Currently, when resolving via Permit.Ecto.Resolver, it is not possible to use loader as defined in vanilla Permit, because it is fully replaced with base_query and finalize_query.
It would be useful for the developer to be able to use loader in special cases instead of base_query even if Ecto is in play, but there has to be a discussion about what API to use.
It could be rather problematic to allow using both functions, but something that has crossed my mind would be that a resolver could configure a pipeline like this:
# Ecto resolver
def pre_pipeline(...), do: [&base_query/4, &loader/4]
def post_pipeline(...), do: [&finalize_query/5]
# Vanilla resolver
def pre_pipeline(...), do: [&loader/4]
def post_pipeline(...), do: []Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request