Class FederatedSchemaGeneratorHooks
-
- All Implemented Interfaces:
-
com.expediagroup.graphql.generator.hooks.SchemaGeneratorHooks
public class FederatedSchemaGeneratorHooks implements SchemaGeneratorHooks
Hooks for generating federated GraphQL schema.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
FederatedSchemaGeneratorHooks.LinkSpec
-
Field Summary
Fields Modifier and Type Field Description private final KotlinDirectiveWiringFactory
wiringFactory
-
Constructor Summary
Constructors Constructor Description FederatedSchemaGeneratorHooks(List<FederatedTypeResolver> resolvers, Boolean optInFederationV2)
-
Method Summary
Modifier and Type Method Description GraphQLSchema.Builder
willBuildSchema(List<TopLevelObject> queries, List<TopLevelObject> mutations, List<TopLevelObject> subscriptions, Set<KType> additionalTypes, Set<KType> additionalInputTypes, TopLevelObject schemaObject)
GraphQLType
willGenerateGraphQLType(KType type)
Add support for FieldSet and LinkImport scalars to the schema. GraphQLDirective
willGenerateDirective(DirectiveMetaInformation directiveInfo)
GraphQLAppliedDirective
willApplyDirective(DirectiveMetaInformation directiveInfo, GraphQLDirective directive)
GraphQLType
didGenerateGraphQLType(KType type, GraphQLType generatedType)
GraphQLDirective
didGenerateDirective(DirectiveMetaInformation directiveInfo, GraphQLDirective directive)
GraphQLSchema.Builder
didBuildSchema(GraphQLSchema.Builder builder)
GraphQLObjectType
didGenerateQueryObject(GraphQLObjectType type)
Federated service may not have any regular queries but will have federated queries. -
Methods inherited from class com.expediagroup.graphql.generator.hooks.SchemaGeneratorHooks
didApplyDirective, didGenerateMutationField, didGenerateMutationObject, didGenerateQueryField, didGenerateSubscriptionField, didGenerateSubscriptionObject, getWiringFactory, isValidAdditionalType, isValidFunction, isValidProperty, isValidSubscriptionReturnType, isValidSuperclass, onRewireGraphQLType, willAddGraphQLTypeToSchema, willResolveInputMonad, willResolveMonad
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
FederatedSchemaGeneratorHooks
FederatedSchemaGeneratorHooks(List<FederatedTypeResolver> resolvers, Boolean optInFederationV2)
-
-
Method Detail
-
willBuildSchema
GraphQLSchema.Builder willBuildSchema(List<TopLevelObject> queries, List<TopLevelObject> mutations, List<TopLevelObject> subscriptions, Set<KType> additionalTypes, Set<KType> additionalInputTypes, TopLevelObject schemaObject)
-
willGenerateGraphQLType
GraphQLType willGenerateGraphQLType(KType type)
Add support for FieldSet and LinkImport scalars to the schema.
-
willGenerateDirective
GraphQLDirective willGenerateDirective(DirectiveMetaInformation directiveInfo)
-
willApplyDirective
GraphQLAppliedDirective willApplyDirective(DirectiveMetaInformation directiveInfo, GraphQLDirective directive)
-
didGenerateGraphQLType
GraphQLType didGenerateGraphQLType(KType type, GraphQLType generatedType)
-
didGenerateDirective
GraphQLDirective didGenerateDirective(DirectiveMetaInformation directiveInfo, GraphQLDirective directive)
-
didBuildSchema
GraphQLSchema.Builder didBuildSchema(GraphQLSchema.Builder builder)
-
didGenerateQueryObject
GraphQLObjectType didGenerateQueryObject(GraphQLObjectType type)
Federated service may not have any regular queries but will have federated queries. In order to ensure that we have a valid GraphQL schema that can be modified in the didBuildSchema, query has to have at least one single field.
Add federated _service query to ensure it is a valid GraphQL schema.
-
-
-
-