Struct harmonizer::ServiceDefinition[][src]

pub struct ServiceDefinition {
    pub name: String,
    pub url: String,
    pub type_defs: String,
}

The ServiceDefinition represents everything we need to know about a service (subgraph) for its GraphQL runtime responsibilities. It is not at all different from the notion of ServiceDefinition in TypeScript used in Apollo Gateway’s operation.

Since we’ll be running this within a JavaScript environment these properties will be serialized into camelCase, to match the JavaScript expectations.

Fields

name: String

The name of the service (subgraph). We use this name internally to in the representation of the composed schema and for designations within the human-readable QueryPlan.

url: String

The routing/runtime URL where the subgraph can be found that will be able to fulfill the requests it is responsible for.

type_defs: String

The Schema Definition Language (SDL)

Implementations

impl ServiceDefinition[src]

pub fn new<N: Into<String>, U: Into<String>, D: Into<String>>(
    name: N,
    url: U,
    type_defs: D
) -> ServiceDefinition
[src]

Create a new ServiceDefinition

Trait Implementations

impl Debug for ServiceDefinition[src]

impl Serialize for ServiceDefinition[src]

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.