2020-03-01 13:56:14 +00:00
|
|
|
//! # The GraphQL server library implemented by rust
|
|
|
|
//!
|
|
|
|
//! <div align="center">
|
|
|
|
//! <!-- CI -->
|
|
|
|
//! <img src="https://github.com/sunli829/potatonet/workflows/CI/badge.svg" />
|
|
|
|
//! <!-- Crates version -->
|
|
|
|
//! <a href="https://crates.io/crates/async-graphql">
|
|
|
|
//! <img src="https://img.shields.io/crates/v/async-graphql.svg?style=flat-square"
|
|
|
|
//! alt="Crates.io version" />
|
|
|
|
//! </a>
|
|
|
|
//! <!-- Downloads -->
|
|
|
|
//! <a href="https://crates.io/crates/async-graphql">
|
|
|
|
//! <img src="https://img.shields.io/crates/d/async-graphql.svg?style=flat-square"
|
|
|
|
//! alt="Download" />
|
|
|
|
//! </a>
|
|
|
|
//! <!-- docs.rs docs -->
|
|
|
|
//! <a href="https://docs.rs/async-graphql">
|
|
|
|
//! <img src="https://img.shields.io/badge/docs-latest-blue.svg?style=flat-square"
|
|
|
|
//! alt="docs.rs docs" />
|
|
|
|
//! </a>
|
|
|
|
//! </div>
|
|
|
|
//!
|
|
|
|
//! ## Documentation
|
|
|
|
//!
|
|
|
|
//! * [GitHub repository](https://github.com/sunli829/async-graphql)
|
|
|
|
//! * [Cargo package](https://crates.io/crates/async-graphql)
|
|
|
|
//! * Minimum supported Rust version: 1.39 or later
|
|
|
|
//!
|
|
|
|
//! ## References
|
|
|
|
//!
|
|
|
|
//! * [GraphQL](https://graphql.org)
|
|
|
|
|
2020-03-01 10:54:34 +00:00
|
|
|
#[macro_use]
|
|
|
|
extern crate thiserror;
|
|
|
|
|
|
|
|
mod context;
|
|
|
|
mod r#enum;
|
|
|
|
mod error;
|
2020-03-01 16:59:04 +00:00
|
|
|
mod id;
|
2020-03-01 10:54:34 +00:00
|
|
|
mod query;
|
|
|
|
mod scalar;
|
|
|
|
mod r#type;
|
|
|
|
|
|
|
|
#[cfg(feature = "chrono")]
|
|
|
|
mod datetime;
|
|
|
|
#[cfg(feature = "uuid")]
|
|
|
|
mod uuid;
|
|
|
|
|
2020-03-01 17:15:05 +00:00
|
|
|
#[doc(hidden)]
|
2020-03-01 10:54:34 +00:00
|
|
|
pub use anyhow;
|
2020-03-01 17:15:05 +00:00
|
|
|
#[doc(hidden)]
|
2020-03-01 10:54:34 +00:00
|
|
|
pub use async_trait;
|
2020-03-01 17:15:05 +00:00
|
|
|
#[doc(hidden)]
|
2020-03-01 10:54:34 +00:00
|
|
|
pub use graphql_parser;
|
2020-03-01 17:15:05 +00:00
|
|
|
#[doc(hidden)]
|
2020-03-01 10:54:34 +00:00
|
|
|
pub use serde_json;
|
|
|
|
|
|
|
|
pub use async_graphql_derive::{Enum, InputObject, Object};
|
2020-03-01 17:15:05 +00:00
|
|
|
pub use context::{Context, ContextField, Data, Variables};
|
2020-03-01 13:35:39 +00:00
|
|
|
pub use error::{ErrorWithPosition, PositionError, QueryError, QueryParseError};
|
2020-03-01 10:54:34 +00:00
|
|
|
pub use graphql_parser::query::Value;
|
2020-03-01 16:59:04 +00:00
|
|
|
pub use id::ID;
|
2020-03-01 13:35:39 +00:00
|
|
|
pub use query::QueryBuilder;
|
|
|
|
pub use scalar::Scalar;
|
|
|
|
|
|
|
|
// internal types
|
2020-03-01 17:15:05 +00:00
|
|
|
#[doc(hidden)]
|
|
|
|
pub use context::ContextSelectionSet;
|
|
|
|
#[doc(hidden)]
|
2020-03-01 10:54:34 +00:00
|
|
|
pub use r#enum::{GQLEnum, GQLEnumItem};
|
2020-03-01 17:15:05 +00:00
|
|
|
#[doc(hidden)]
|
2020-03-01 10:54:34 +00:00
|
|
|
pub use r#type::{
|
|
|
|
GQLEmptyMutation, GQLInputObject, GQLInputValue, GQLObject, GQLOutputValue, GQLType,
|
|
|
|
};
|
|
|
|
|
|
|
|
pub type Result<T> = anyhow::Result<T>;
|
|
|
|
pub type Error = anyhow::Error;
|