#[non_exhaustive]pub struct QueryFunctionRequest<'a> {
pub function: &'a str,
pub field: &'a str,
pub arguments: &'a Value,
pub principal: Option<&'a SecurityContext>,
pub reader: Arc<dyn GuestQueryBridge>,
}Expand description
The field a QueryFunctionResolver is being asked to answer.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.function: &'a strThe declared function name, from the compiled query’s function key.
Never the field name: one function may back several fields, and the compiler checks the pairing in both directions, so this is the only name the dispatcher needs to look anything up by.
field: &'a strThe root query field being answered.
Passed so the guest can tell which field it was invoked for when one function backs several, and so a failure names the field rather than the module.
arguments: &'a ValueThe field’s resolved arguments: request variables merged with the root field’s
inline literals, nested $var references already substituted. An empty object
when the field takes none.
principal: Option<&'a SecurityContext>The requesting principal, or None for an anonymous request.
reader: Arc<dyn GuestQueryBridge>The caller-scoped, read-only GraphQL bridge (#1328).
The same bridge a before:mutation hook reads through, built from this
request’s own executor context and principal — deliberately not a second one.
A function-backed field that reads sees exactly what its caller could have
read, and cannot write.