Class SchemaTransformer

java.lang.Object
com.apollographql.federation.graphqljava.SchemaTransformer

public final class SchemaTransformer extends Object
  • Method Details

    • resolveEntityType

      @NotNull public @NotNull SchemaTransformer resolveEntityType(graphql.schema.TypeResolver entityTypeResolver)
    • fetchEntities

      @NotNull public @NotNull SchemaTransformer fetchEntities(graphql.schema.DataFetcher entitiesDataFetcher)
    • fetchEntitiesFactory

      @NotNull public @NotNull SchemaTransformer fetchEntitiesFactory(graphql.schema.DataFetcherFactory entitiesDataFetcherFactory)
    • coercingForAny

      public SchemaTransformer coercingForAny(graphql.schema.Coercing coercing)
    • setFederation2

      public SchemaTransformer setFederation2(boolean isFederation2)
    • build

      @NotNull public @NotNull graphql.schema.GraphQLSchema build() throws graphql.schema.idl.errors.SchemaProblem
      Throws:
      graphql.schema.idl.errors.SchemaProblem
    • sdl

      @Deprecated public static String sdl(graphql.schema.GraphQLSchema schema)
      Deprecated.
      use ServiceSDLPrinter instead
      Generate Apollo Federation v1 compatible SDL that should be returned from `_service { sdl }` query.
      Parameters:
      schema - target schema
      Returns:
      SDL compatible with Apollo Federation v1
    • sdl

      @Deprecated public static String sdl(graphql.schema.GraphQLSchema schema, boolean queryTypeShouldBeEmpty)
      Deprecated.
      use ServiceSDLPrinter instead
      Generate Apollo Federation v1 compatible SDL that should be returned from `_service { sdl }` query.
      Parameters:
      schema - target schema
      queryTypeShouldBeEmpty - boolean flag indicating whether schema contains dummy query that should be removed
      Returns:
      SDL compatible with Apollo Federation v1