Struct apollo_router::services::supergraph::Request
source ยท #[non_exhaustive]pub struct Request {
pub supergraph_request: Request<Request>,
pub context: Context,
}Expand description
Represents the router processing step of the processing pipeline.
This consists of the parsed graphql Request, HTTP headers and contextual data for extensions.
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.supergraph_request: Request<Request>Original request to the Router.
context: ContextContext for extension
Implementationsยง
sourceยงimpl Request
impl Request
sourcepub fn builder() -> NewRequestBuilder
pub fn builder() -> NewRequestBuilder
This is the constructor (or builder) to use when constructing a real Request.
Required parameters are required in non-testing code to create a Request.
sourceยงimpl Request
impl Request
sourcepub fn fake_builder() -> FakeNewRequestBuilder
pub fn fake_builder() -> FakeNewRequestBuilder
This is the constructor (or builder) to use when constructing a โfakeโ Request.
This does not enforce the provision of the data that is required for a fully functional Request. Itโs usually enough for testing, when a fully constructed Request is difficult to construct and not required for the purposes of the test.
In addition, fake requests are expected to be valid, and will panic if given invalid values.
sourceยงimpl Request
impl Request
sourcepub fn canned_builder() -> CannedNewRequestBuilder
pub fn canned_builder() -> CannedNewRequestBuilder
Create a request with an example query, for tests
Trait Implementationsยง
sourceยงimpl Service<Request> for MockSupergraphService
impl Service<Request> for MockSupergraphService
ยงtype Future = Pin<Box<dyn Future<Output = Result<<MockSupergraphService as Service<Request>>::Response, <MockSupergraphService as Service<Request>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<MockSupergraphService as Service<Request>>::Response, <MockSupergraphService as Service<Request>>::Error>> + Send>>
Auto Trait Implementationsยง
impl !RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl !UnwindSafe for Request
Blanket Implementationsยง
ยงimpl<T> AnySync for T
impl<T> AnySync for T
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
sourceยงimpl<T> FutureExt for T
impl<T> FutureExt for T
sourceยงfn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
sourceยงfn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
sourceยงimpl<T> Instrument for T
impl<T> Instrument for T
sourceยงfn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourceยงfn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceยงimpl<T> Instrument for T
impl<T> Instrument for T
sourceยงfn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourceยงfn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceยงimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourceยงfn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request