ProcaWeb.Resolvers.AuthNotation (proca v3.4.1)

Provides macros to handle auth flow in schema files.

For queries:

  • load :campaign, by: [:id] - fetch a record by primary or secondary identifier

  • determine_auth for: result - use after a resolution. Provides a relevant Auth context for interfaces to be resolved (public vs private)

For mutatuins an queries

  • allow - allow list of permissions to run that mutation or receive that value

Link to this section Summary

Functions

allow [:manage_orgs, :perm2, :perm3]

determine_auth for: :result

load :campaign, by: [:id, :external_id, :name]

Link to this section Functions

Link to this macro

allow(perms)

(macro)

allow [:manage_orgs, :perm2, :perm3]

Link to this macro

determine_auth(opts)

(macro)

determine_auth for: :result

Link to this macro

load(type, by_fields)

(macro)

load :campaign, by: [:id, :external_id, :name]

Link to this macro

load_assoc()

(macro)
Link to this function

load_assoc_resolver(parent, _, resol)