Module cynic::schema

source ·
Expand description

Types for describing a GraphQL schema in Rust.

The use_schema macro will mostly output types that make use of the traits in this module to describe the schema. The derives then combine these types with the QueryBuilder type to enforce the restrictions of the schema.

Note that this module is mostly concerned with the marker types output by use_schema, not the actual types users work with. The traits will usually be implemented on marker types, the geneirc parameters will usually be marker types and the associated types will also usually be markers.

Traits§

  • Indicates that a struct represents a Field in a graphql schema.
  • Indicates that a field has an argument
  • Indicates that a type has a given field
  • Indicates that an input object has a given field
  • Indicates that a type has a subtype relationship with another type
  • Indicates that a type is an InputObject
  • Indicates that a type is a scalar that maps to the given schema scalar.
  • A marker trait that indicates a particular type is at the root of a GraphQL schemas mutation hierarchy.
  • A marker type with a name.
  • A marker trait that indicates a particular type is at the root of a GraphQL schemas query hierarchy.
  • A marker trait that indicates a particular type is at the root of a GraphQL schemas subscription hierarchy.