pub struct FakeGraphql { /* private fields */ }Expand description
Stub outbound GraphQL by query substring; records every call.
Implementations§
Source§impl FakeGraphql
impl FakeGraphql
pub fn new() -> Self
Sourcepub fn stub(self, needle: impl Into<String>, data: Value) -> Self
pub fn stub(self, needle: impl Into<String>, data: Value) -> Self
When the query contains needle, respond with { "data": body }.
pub fn calls(&self) -> Vec<GraphqlCall>
pub fn clear(&self)
pub fn assert_called(&self)
pub fn assert_called_with(&self, needle: &str)
Trait Implementations§
Source§impl Clone for FakeGraphql
impl Clone for FakeGraphql
Source§fn clone(&self) -> FakeGraphql
fn clone(&self) -> FakeGraphql
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for FakeGraphql
impl Default for FakeGraphql
Source§fn default() -> FakeGraphql
fn default() -> FakeGraphql
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FakeGraphql
impl RefUnwindSafe for FakeGraphql
impl Send for FakeGraphql
impl Sync for FakeGraphql
impl Unpin for FakeGraphql
impl UnsafeUnpin for FakeGraphql
impl UnwindSafe for FakeGraphql
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