Crate graphql_toolkit_ast

source ·
Expand description

A collection of Rust modules to process GraphQL documents

This module contains the AST types and traits for the GraphQL query language.

Modules§

  • IndexMap is a hash table where the iteration order of the key-value pairs is independent of the hash values of the keys.

Macros§

  • Construct a ConstValue.

Structs§

  • A const GraphQL directive, such as @deprecated(reason: "Use the other field). This differs from Directive in that it uses ConstValue instead of Value.
  • This type represents errors that can occur when deserializing.
  • A GraphQL directive, such as @deprecated(reason: "Use the other field").
  • The definition of a directive in a service.
  • The definition of an enum.
  • The definition of a value inside an enum.
  • An executable GraphQL file or request string.
  • A field being selected on an object, such as name or weightKilos: weight(unit: KILOGRAMS).
  • The definition of a field inside an object or interface.
  • The definition of a fragment, such as fragment userFields on User { name age }.
  • A fragment selector, such as ... userFields.
  • An inline fragment selector, such as ... on User { name }.
  • The definition of an input object.
  • The definition of an input value inside the arguments of a field.
  • The definition of an interface type.
  • A GraphQL name.
  • Represents a JSON number, whether integer or floating point.
  • The definition of an object type.
  • A GraphQL operation, such as mutation($content:String!) { makePost(content: $content) { id } }.
  • An iterator over the operations of a document.
  • Original position of an element in source code.
  • An AST node that stores its original position.
  • The definition of the schema in a GraphQL service.
  • A set of fields to be selected, for example { name age }.
  • This type represents errors that can occur when serializing.
  • A GraphQL file or request string defining a GraphQL service.
  • A GraphQL type, for example String or [String!]!.
  • A type a fragment can apply to (on followed by the type).
  • The definition of a type in a GraphQL service.
  • The definition of a union type.
  • A variable definition inside a list of variable definitions, for example $name:String!.
  • Variables of a query.

Enums§

  • A GraphQL base type, for example String or [String!]. This does not include whether the type is nullable; for that see Type.
  • A resolved GraphQL value, for example 1 or "Hello World!".
  • Where a directive can apply to.
  • The operations of a GraphQL document.
  • The type of an operation; query, mutation or subscription.
  • A part of an object to be selected; a single field, a fragment spread or an inline fragment.
  • A kind of type; scalar, object, enum, etc.
  • A definition concerning the type system of a GraphQL service.
  • A GraphQL value, for example 1, $name or "Hello World!". This is ConstValue with variables.

Traits§

  • Extension trait for adding position information to AST nodes.
  • A value-to-AST conversion trait that consumes the input value.

Functions§

  • Interpret a ConstValue as an instance of type T.
  • Convert a T into ConstValue which is an enum that can represent any valid GraphQL data.