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::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::IntoResolvable;
pub use crate::executor::Registry;
pub use crate::executor::ValuesStream;
pub use crate::executor::Variables;

Modules

Resolve the document to values
Utilities for building HTTP endpoints in a library-agnostic manner
Provides GraphQLType implementations for some external types
Marker traits for GraphQL types.
Types used to describe a GraphQL schema
Query parser and language utilities
Library tests and fixtures
Query validation related methods and data structures

Macros

Asserts validness of [Field] [Arguments] and returned [Type].
Asserts validness of the [Field]s arguments. See spec for more info.
Asserts that #[graphql_interface(for = ...)] has all the types referencing this interface in the impl = ... attribute argument.
Asserts that impl = ... attribute argument has all the types referencing this GraphQL type in #[graphql_interface(for = ...)].
Asserts validness of a [Field] return type.
Asserts that all transitive interfaces (the ones implemented by the $interface) are also implemented by the $implementor.
Ensures that the given $impl_ty implements [Field] and returns a [fnv1a128] hash for it, otherwise panics with understandable message.
Concatenates const strs in a const context.
Formats the given [Type] and [WrappedValue] into a readable GraphQL type name.
Constructs InputValues via JSON-like syntax.
Constructs Values via JSON-like syntax.
Constructs Variables via JSON-like syntax.

Structs

Field argument container
Utility type to define read-only schemas
Utillity type to define read-only schemas
Represents the result of executing a GraphQL operation (after parsing and validating has been done).
An ID as defined by the GraphQL specification
An argument passed into the query
A selection performed by a query
An Object value
Executor owning all its variables. Can be used after Executor was destroyed.
Root query node of a schema
Query validation error
Metadata for a schema
Data structure used to wrap items with start and end markers in the input source

Enums

An enum that describes if a field is available in all types of the interface or only in a certain subtype
The default ScalarValue representation in juniper.
An error that prevented query execution
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.
A JSON-like value that can is used as argument in the query execution
Nullable can be used in situations where you need to distinguish between an implicitly and explicitly null input value.
Error while parsing a GraphQL query
A single scalar value literal
Entry in a GraphQL selection set
A type literal in the syntax tree
GraphQL type kind
Serializable value returned from query and field execution.

Traits

This trait is used in juniper::graphql_subscription macro to get stream’s item type that implements GraphQLValue from type alias provided by user.
Parsing of an unstructured input value into a Rust data type.
Extension of GraphQLType trait with asynchronous subscription execution logic.
Extension of GraphQLValue trait with asynchronous subscription execution logic. It should be used with GraphQLValue in order to implement subscription resolvers on GraphQL objects.
Primary trait used to expose Rust types in a GraphQL schema.
Extension of GraphQLType trait with asynchronous queries/mutations resolvers.
Primary trait used to resolve GraphQL values.
Extension of GraphQLValue trait with asynchronous queries/mutations resolvers.
Trait for wrapping [Stream] into Ok if it’s not Result.
Set of common methods for ConcreteLookAheadSelection and LookAheadSelection.
A trait used to convert a ScalarToken into a certain scalar value type
A trait marking a type that could be used as internal representation of scalar values in juniper
Single subscription connection.
Global subscription coordinator trait.
Losslessly clones a Rust data type into an InputValue.

Functions

Execute a query in a provided schema
Execute a query synchronously in a provided schema
Execute the reference introspection query in the provided schema
Resolve subscription into ValuesStream

Type Definitions

An owned dynamically typed Future for use in cases where you can’t statically type your result or need to add some indirection.
BoxFuture, but without the Send requirement.
The result of converting a string into a scalar value

Attribute Macros

#[graphql_interface] macro for generating a GraphQL interface implementation for traits and its implementers.
#[graphql_object] macro for generating a GraphQL object implementation for structs with computable field resolvers (declared via a regular Rust impl block).
#[graphql_scalar] macro.is interchangeable with #[derive(GraphQLScalar)] macro, and is used for deriving a GraphQL scalar implementation.
#[graphql_subscription] macro for generating a GraphQL subscription implementation for structs with computable field resolvers (declared via a regular Rust impl block).
#[graphql_union] macro for deriving a GraphQL union implementation for traits.

Derive Macros

#[derive(GraphQLEnum)] macro for deriving a GraphQL enum implementation for Rust enums.
#[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.
#[derive(GraphQLInterface)] macro for generating a [GraphQL interface][1] implementation for traits and its implementers.
#[derive(GraphQLObject)] macro for deriving a GraphQL object implementation for structs.
#[derive(GraphQLScalar)] macro for deriving a GraphQL scalar implementation.
#[derive(GraphQLUnion)] macro for deriving a GraphQL union implementation for enums and structs.
#[derive(ScalarValue)] macro for deriving a ScalarValue implementation.