Expand description
§juniper_puff
crate
This is a pre-release of juniper_puff
current master with no changes for use with puff-rs
.
Re-exports§
pub use crate::executor::Applies;
pub use crate::executor::Context;
pub use crate::executor::ExecutionError;
pub use crate::executor::ExecutionResult;
pub use crate::executor::Executor;
pub use crate::executor::FieldError;
pub use crate::executor::FieldResult;
pub use crate::executor::FromContext;
pub use crate::executor::IntoFieldError;
pub use crate::executor::LookAheadArgument;
pub use crate::executor::LookAheadMethods;
pub use crate::executor::LookAheadSelection;
pub use crate::executor::LookAheadValue;
pub use crate::executor::OwnedExecutor;
pub use crate::executor::Registry;
pub use crate::executor::ValuesStream;
pub use crate::executor::Variables;
pub use crate::parser::ParseError;
pub use crate::parser::ScalarToken;
pub use crate::parser::Spanning;
pub use crate::validation::RuleError;
Modules§
- executor
- Resolve the document to values
- http
- Utilities for building HTTP endpoints in a library-agnostic manner
- integrations
- Provides GraphQLType implementations for some external types
- marker
- Marker traits for GraphQL types.
- meta
- Types used to describe a
GraphQL
schema - parser
- Query parser and language utilities
- tests
- Library tests and fixtures
- validation
- Query validation related methods and data structures
Macros§
- assert_
field - Asserts validness of [
Field
] [Arguments
] and returned [Type
]. - assert_
field_ args - Asserts validness of the [
Field
]s arguments. See spec for more info. - assert_
implemented_ for - Asserts that
#[graphql_interface(for = ...)]
has all the types referencing this interface in theimpl = ...
attribute argument. - assert_
interfaces_ impls - Asserts that
impl = ...
attribute argument has all the types referencing this GraphQL type in#[graphql_interface(for = ...)]
. - assert_
subtype - Asserts validness of a [
Field
] return type. - assert_
transitive_ impls - Asserts that all transitive interfaces (the ones implemented by the
$interface
) are also implemented by the$implementor
. - checked_
hash - Ensures that the given
$impl_ty
implements [Field
] and returns a [fnv1a128
] hash for it, otherwise panics with understandable message. - const_
concat - Concatenates
const
str
s in aconst
context. - format_
type - Formats the given [
Type
] and [WrappedValue
] into a readable GraphQL type name. - graphql_
input_ value - Constructs
InputValue
s via JSON-like syntax. - graphql_
value - Constructs
Value
s via JSON-like syntax. - graphql_
vars - Constructs
Variables
via JSON-like syntax.
Structs§
- Arguments
- Field argument container
- Empty
Mutation - Utility type to define read-only schemas
- Empty
Subscription - Utillity type to define read-only schemas
- Execution
Output - Represents the result of executing a GraphQL operation (after parsing and validating has been done).
- ID
- An ID as defined by the GraphQL specification
- Object
- An Object value
- Operation
- Root
Node - Root query node of a schema
- Schema
Type - Metadata for a schema
Enums§
- Default
Scalar Value - The default
ScalarValue
representation injuniper
. - GraphQL
Error - An error that prevented query execution
- Input
Value - A JSON-like value that can be passed into the query execution, either out-of-band, or in-band as default variable values. These are not constant and might contain variables.
- Introspection
Format - The desired GraphQL introspection format for the canonical query (https://github.com/graphql/graphql-js/blob/90bd6ff72625173dd39a1f82cfad9336cfad8f65/src/utilities/getIntrospectionQuery.ts#L62)
- Nullable
Nullable
can be used in situations where you need to distinguish between an implicitly and explicitly null input value.- Operation
Type - Selection
- Entry in a GraphQL selection set
- Type
- A type literal in the syntax tree
- Type
Kind - GraphQL type kind
- Value
- Serializable value returned from query and field execution.
Traits§
- Extract
Type From Stream - This trait is used in
juniper::graphql_subscription
macro to get stream’s item type that implementsGraphQLValue
from type alias provided by user. - From
Input Value - Parsing of an unstructured input value into a Rust data type.
- GraphQL
Interface - Maker trait for GraphQL interfaces.
- GraphQL
Object - Maker trait for GraphQL objects.
- GraphQL
Subscription Type - Extension of
GraphQLType
trait with asynchronous subscription execution logic. - GraphQL
Subscription Value - Extension of
GraphQLValue
trait with asynchronous subscription execution logic. It should be used withGraphQLValue
in order to implement subscription resolvers on GraphQL objects. - GraphQL
Type - Primary trait used to expose Rust types in a GraphQL schema.
- GraphQL
Type Async - Extension of
GraphQLType
trait with asynchronous queries/mutations resolvers. - GraphQL
Union - Maker trait for GraphQL unions.
- GraphQL
Value - Primary trait used to resolve GraphQL values.
- GraphQL
Value Async - Extension of
GraphQLValue
trait with asynchronous queries/mutations resolvers. - Into
Field Result - Trait for wrapping
Stream
intoOk
if it’s notResult
. - Parse
Scalar Value - A trait used to convert a
ScalarToken
into a certain scalar value type - Scalar
Value - A trait marking a type that could be used as internal representation of scalar values in juniper
- Subscription
Connection - Single subscription connection.
- Subscription
Coordinator - Global subscription coordinator trait.
- ToInput
Value - Losslessly clones a Rust data type into an InputValue.
Functions§
- execute
- Execute a query in a provided schema
- execute_
sync - Execute a query synchronously in a provided schema
- introspect
- Execute the reference introspection query in the provided schema
- resolve_
into_ stream - Resolve subscription into
ValuesStream
Type Aliases§
- BoxFuture
- An owned dynamically typed
Future
for use in cases where you can’t statically type your result or need to add some indirection. - Local
BoxFuture BoxFuture
, but without theSend
requirement.- Parse
Scalar Result - The result of converting a string into a scalar value
Attribute Macros§
- graphql_
interface #[graphql_interface]
macro for generating a GraphQL interface implementation for traits and its implementers.- graphql_
object #[graphql_object]
macro for generating a GraphQL object implementation for structs with computable field resolvers (declared via a regular Rustimpl
block).- graphql_
scalar #[graphql_scalar]
macro.is interchangeable with#[derive(
GraphQLScalar
)]
macro, and is used for deriving a GraphQL scalar implementation.- graphql_
subscription #[graphql_subscription]
macro for generating a GraphQL subscription implementation for structs with computable field resolvers (declared via a regular Rustimpl
block).- graphql_
union #[graphql_union]
macro for deriving a GraphQL union implementation for traits.
Derive Macros§
- GraphQL
Enum #[derive(GraphQLEnum)]
macro for deriving a GraphQL enum implementation for Rust enums.- GraphQL
Input Object #[derive(GraphQLInputObject)]
macro for deriving a GraphQL input object implementation for a Rust struct. Each non-ignored field type must itself be GraphQL input object or a GraphQL scalar.- GraphQL
Interface #[derive(GraphQLInterface)]
macro for generating a [GraphQL interface][1] implementation for traits and its implementers.- GraphQL
Object #[derive(GraphQLObject)]
macro for deriving a GraphQL object implementation for structs.- GraphQL
Scalar #[derive(GraphQLScalar)]
macro for deriving a GraphQL scalar implementation.- GraphQL
Union #[derive(GraphQLUnion)]
macro for deriving a GraphQL union implementation for enums and structs.- Scalar
Value #[derive(ScalarValue)]
macro for deriving aScalarValue
implementation.