graphql_query/schema/
mod.rs

1//! # Using Schema Definitions
2//!
3//! The `graphql_query::schema` module contains utilities to create a GraphQL Schema or parse it from
4//! introspection data. This information may then be used to validate and introspect a schema as to
5//! possible queries that may be written against it.
6//!
7//! The [BuildClientSchema] trait may be used to convert introspection data into a usable [Schema],
8//! which may then be used to inspect GraphQL defnitions:
9//!
10//! ```
11//! use graphql_query::{ast::ASTContext, schema::*};
12//!
13//! fn inspect() {
14//!     let ctx = ASTContext::new();
15//!
16//!     let introspection_json = include_str!("../../fixture/introspection_query.json");
17//!     let introspection: IntrospectionQuery = serde_json::from_str(introspection_json).unwrap();
18//!     let _schema = introspection.build_client_schema(&ctx);
19//! }
20//! ```
21//!
22//! [More information on the Schema struct.](Schema)
23
24pub mod build_client_schema;
25pub mod introspection;
26#[allow(clippy::module_inception)]
27pub mod schema;
28mod schema_reference;
29
30pub use build_client_schema::BuildClientSchema;
31pub use introspection::{IntrospectionQuery, IntrospectionSchema};
32pub use schema::*;
33pub use schema_reference::*;