graphql_federated_graph/federated_graph/
extensions.rs

1use super::*;
2
3#[derive(Clone, Debug)]
4pub struct Extension {
5    /// Name of the extension within the federated graph. It does NOT necessarily matches the extension's name
6    /// in its manifest, see the `id` field for this.
7    pub enum_value_id: EnumValueId,
8    pub url: StringId,
9    pub schema_directives: Vec<ExtensionLinkSchemaDirective>,
10}
11
12impl FederatedGraph {
13    pub fn push_extension(&mut self, extension: Extension) -> ExtensionId {
14        let id = self.extensions.len().into();
15        self.extensions.push(extension);
16        id
17    }
18}