Expand description
§Using Schema Definitions
The graphql_query::schema
module contains utilities to create a GraphQL Schema or parse it from
introspection data. This information may then be used to validate and introspect a schema as to
possible queries that may be written against it.
The BuildClientSchema trait may be used to convert introspection data into a usable Schema, which may then be used to inspect GraphQL defnitions:
use graphql_query::{ast::ASTContext, schema::*};
fn inspect() {
let ctx = ASTContext::new();
let introspection_json = include_str!("../../fixture/introspection_query.json");
let introspection: IntrospectionQuery = serde_json::from_str(introspection_json).unwrap();
let _schema = introspection.build_client_schema(&ctx);
}
Re-exports§
pub use build_client_schema::BuildClientSchema;
pub use introspection::IntrospectionQuery;
pub use introspection::IntrospectionSchema;
pub use schema::*;
Modules§
Structs§
- Schema
Reference - Schema Reference