[][src]Struct async_graphql::QueryBuilder

pub struct QueryBuilder { /* fields omitted */ }

Query builder

Implementations

impl QueryBuilder[src]

pub fn new<T: Into<String>>(query_source: T) -> QueryBuilder[src]

Create query builder with query source.

pub fn operation_name<T: Into<String>>(self, name: T) -> Self[src]

Specify the operation name.

pub fn variables(self, variables: Variables) -> Self[src]

Specify the variables.

pub fn extension<F: Fn() -> E + Send + Sync + 'static, E: Extension>(
    self,
    extension_factory: F
) -> Self
[src]

Add an extension

pub fn data<D: Any + Send + Sync>(self, data: D) -> Self[src]

Add a context data that can be accessed in the Context, you access it with Context::data.

This data is only valid for this query

pub fn set_upload(
    &mut self,
    var_path: &str,
    filename: String,
    content_type: Option<String>,
    content: File
)
[src]

Set uploaded file path

pub async fn execute_stream<'_, Query, Mutation, Subscription>(
    self,
    schema: &'_ Schema<Query, Mutation, Subscription>
) -> StreamResponse where
    Query: ObjectType + Send + Sync + 'static,
    Mutation: ObjectType + Send + Sync + 'static,
    Subscription: SubscriptionType + Send + Sync + 'static, 
[src]

Execute the query, returns a stream, the first result being the query result, followed by the incremental result. Only when there are @defer and @stream directives in the query will there be subsequent incremental results.

pub async fn execute<'_, Query, Mutation, Subscription>(
    self,
    schema: &'_ Schema<Query, Mutation, Subscription>
) -> Result<QueryResponse> where
    Query: ObjectType + Send + Sync + 'static,
    Mutation: ObjectType + Send + Sync + 'static,
    Subscription: SubscriptionType + Send + Sync + 'static, 
[src]

Execute the query, always return a complete result.

pub fn query_source(&self) -> &str[src]

Get query source

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,