Class SchemaBuilder

java.lang.Object
io.smallrye.graphql.schema.SchemaBuilder

public class SchemaBuilder extends Object
This builds schema model using Jandex.

It starts scanning all queries and mutation, building the operations for those. The operation reference some types (via Reference) that should be created and added to the schema.

The creation of these type them self create more references to types (via Reference) that should be created and added to the scheme.

It does above recursively until there is no more things to create.

Author:
Phillip Kruger (phillip.kruger@redhat.com)
  • Method Details

    • build

      public static Schema build(org.jboss.jandex.IndexView index)
      This builds the Schema from Jandex
      Parameters:
      index - the Jandex index
      Returns:
      the Schema
    • build

      public static Schema build(org.jboss.jandex.IndexView index, TypeAutoNameStrategy autoNameStrategy)
      This builds the Schema from Jandex
      Parameters:
      index - the Jandex index
      autoNameStrategy - the naming strategy
      Returns:
      the Schema