Struct juniper::Registry [] [src]

pub struct Registry<'r> {
    pub types: FnvHashMap<Name, 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]

[src]

Construct a new registry

[src]

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.

[src]

Create a field with the provided name

[src]

Create an argument with the provided name

[src]

Create an argument with a default value

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

[src]

Create a scalar meta type

This expects the type to implement FromInputValue.

[src]

Create a list meta type

[src]

Create a nullable meta type

[src]

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.

[src]

Create an enum meta type

[src]

Create an interface meta type builder, by providing a type info object.

[src]

Create a union meta type builder

[src]

Create an input object meta type builder