pub struct HttpMutationClient { /* private fields */ }Expand description
HTTP client for executing mutations on remote subgraphs
Implementations§
Source§impl HttpMutationClient
impl HttpMutationClient
Sourcepub fn new(config: HttpMutationConfig) -> Self
pub fn new(config: HttpMutationConfig) -> Self
Create a new HTTP mutation client
Sourcepub async fn execute_mutation(
&self,
subgraph_url: &str,
typename: &str,
mutation_name: &str,
variables: &Value,
metadata: &FederationMetadata,
) -> Result<Value>
pub async fn execute_mutation( &self, subgraph_url: &str, typename: &str, mutation_name: &str, variables: &Value, metadata: &FederationMetadata, ) -> Result<Value>
Execute a mutation on a remote subgraph
Sourcepub fn build_mutation_query(
&self,
_typename: &str,
mutation_name: &str,
variables: &Value,
fed_type: &FederatedType,
) -> Result<GraphQLRequest>
pub fn build_mutation_query( &self, _typename: &str, mutation_name: &str, variables: &Value, fed_type: &FederatedType, ) -> Result<GraphQLRequest>
Build a GraphQL mutation query
Sourcepub fn build_variable_definitions(&self, variables: &Value) -> Result<String>
pub fn build_variable_definitions(&self, variables: &Value) -> Result<String>
Build GraphQL variable definitions from input variables
Sourcepub fn parse_response(
&self,
response: GraphQLResponse,
mutation_name: &str,
) -> Result<Value>
pub fn parse_response( &self, response: GraphQLResponse, mutation_name: &str, ) -> Result<Value>
Parse mutation response
Auto Trait Implementations§
impl Freeze for HttpMutationClient
impl !RefUnwindSafe for HttpMutationClient
impl Send for HttpMutationClient
impl Sync for HttpMutationClient
impl Unpin for HttpMutationClient
impl UnsafeUnpin for HttpMutationClient
impl !UnwindSafe for HttpMutationClient
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