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;
Modules§
Structs§
- Schema
- Schema Definition
- Schema
Enum - Schema
Field - An object Field type definition.
- Schema
Input Field - Schema
Input Object - An Input Object type definition.
- Schema
Interface - An Interface type definition.
- Schema
Object - An Object type definition.
- Schema
Reference - Schema Reference
- Schema
Scalar - A Scalar type definition.
- Schema
Union - A Union type definition.
Enums§
- Input
Type - An input type enum that represents all possible GraphQL definition types that an argument or input object field may accept.
- Output
Type - An output type enum that represents all possible GraphQL definition types that a field may return.
- Owned
Schema Type - Schema
Type - A named type enum that represents all possible GraphQL definition types.
- TypeRef
Traits§
- Named
- Helper trait to generalize comparisons (see
eq_named_lists). - Schema
Fields - Generic trait for any schema type that implements fields
- Schema
Interfaces - Generic trait for any schema type that implements interfaces
- Schema
Possible Types - Generic trait for any schema type that implements interfaces
- Schema
Super Type - Generic trait for any schema type that may be a super type of other types