Struct juniper::Registry [] [src]

pub struct Registry<'r> {
    pub types: HashMap<String, MetaType<'r>>,
}

A type registry used to build schemas

The registry gathers metadata for all types in a schema. It provides convenience methods to convert types implementing the GraphQLType trait into Type instances and automatically registers them.

Fields

Currently registered types

Methods

impl<'r> Registry<'r>
[src]

Construct a new registry

Get the Type instance for a given GraphQL type

If the registry hasn't seen a type with this name before, it will construct its metadata and store it.

Create a field with the provided name

Create an argument with the provided name

Create an argument with a default value

When called with type T, the actual argument will be given the type Option<T>.

Create a scalar meta type

This expects the type to implement FromInputValue.

Create a list meta type

Create a nullable meta type

Create an object meta type builder

To prevent infinite recursion by enforcing ordering, this returns a function that needs to be called with the list of fields on the object.

Create an enum meta type

Create an interface meta type builder

Create a union meta type builder

Create an input object meta type builder