[−][src]Struct async_graphql::QueryBuilder
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 operator_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][−]
self,
extension_factory: F
) -> Self
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][−]
&mut self,
var_path: &str,
filename: String,
content_type: Option<String>,
content: File
)
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][−]
self,
schema: &'_ Schema<Query, Mutation, Subscription>
) -> StreamResponse where
Query: ObjectType + Send + Sync + 'static,
Mutation: ObjectType + Send + Sync + 'static,
Subscription: SubscriptionType + Send + Sync + 'static,
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][−]
self,
schema: &'_ Schema<Query, Mutation, Subscription>
) -> Result<QueryResponse> where
Query: ObjectType + Send + Sync + 'static,
Mutation: ObjectType + Send + Sync + 'static,
Subscription: SubscriptionType + Send + Sync + 'static,
Execute the query, always return a complete result.
Auto Trait Implementations
impl !RefUnwindSafe for QueryBuilder
impl Send for QueryBuilder
impl Sync for QueryBuilder
impl Unpin for QueryBuilder
impl !UnwindSafe for QueryBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[+]
V: MultiLane<T>,