graphql-schema-validation 0.1.3

A spec compliant implementation of GraphQL SDL schema validation
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
mod constructors;

pub(crate) use constructors::*;

#[derive(Default)]
pub struct Diagnostics {
    pub(crate) errors: Vec<miette::Report>,
}

impl Diagnostics {
    pub fn has_errors(&self) -> bool {
        !self.errors.is_empty()
    }

    pub fn iter(&self) -> impl Iterator<Item = &miette::Report> {
        self.errors.iter()
    }
}