pub struct Interface { /* private fields */ }Available on crate feature
dynamic-schema only.Expand description
A GraphQL interface type
Implementations§
Source§impl Interface
impl Interface
Sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
Set the description
Sourcepub fn extends(self) -> Self
pub fn extends(self) -> Self
Indicates that an object or interface definition is an extension of another definition of that same type.
Sourcepub fn inaccessible(self) -> Self
pub fn inaccessible(self) -> Self
Indicate that an enum is not accessible from a supergraph when using Apollo Federation
Reference: https://www.apollographql.com/docs/federation/federated-types/federated-directives/#inaccessible
Arbitrary string metadata that will be propagated to the supergraph when using Apollo Federation. This attribute is repeatable
Sourcepub fn field(self, field: InterfaceField) -> Self
pub fn field(self, field: InterfaceField) -> Self
Add a field to the interface type
Sourcepub fn implement(self, interface: impl Into<String>) -> Self
pub fn implement(self, interface: impl Into<String>) -> Self
Add an implement to the interface type
Sourcepub fn key(self, fields: impl Into<String>) -> Self
pub fn key(self, fields: impl Into<String>) -> Self
Add an entity key
See also: Object::key
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Interface
impl RefUnwindSafe for Interface
impl Send for Interface
impl Sync for Interface
impl Unpin for Interface
impl UnwindSafe for Interface
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