#[non_exhaustive]pub struct FieldAuthzRequest<'a> {
pub principal: &'a SecurityContext,
pub type_name: &'a str,
pub field_name: &'a str,
pub parent: Option<&'a Value>,
pub arguments: Option<&'a Value>,
}Expand description
A field-level authorization request handed to a FieldAuthorizer.
Carries the principal, the field being resolved (its GraphQL type and name), the full parent row it is being projected from, and the field’s GraphQL arguments — the exact inputs a static scope check lacks.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.principal: &'a SecurityContextThe authenticated principal making the request.
type_name: &'a strThe GraphQL type name that owns the field (e.g. "User").
field_name: &'a strThe field name being authorized (e.g. "email").
parent: Option<&'a Value>The full row/object the field is projected from, when available.
This is the complete fetched row (not just the selected fields), so a
policy may key on columns the client did not select (e.g. an owner_id
used to decide ownership). None only on paths where no row context exists.
arguments: Option<&'a Value>The field’s GraphQL arguments, when present.
Auto Trait Implementations§
impl<'a> Freeze for FieldAuthzRequest<'a>
impl<'a> RefUnwindSafe for FieldAuthzRequest<'a>
impl<'a> Send for FieldAuthzRequest<'a>
impl<'a> Sync for FieldAuthzRequest<'a>
impl<'a> Unpin for FieldAuthzRequest<'a>
impl<'a> UnsafeUnpin for FieldAuthzRequest<'a>
impl<'a> UnwindSafe for FieldAuthzRequest<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more