-
- All Implemented Interfaces:
-
com.expediagroup.graphql.generator.hooks.SchemaGeneratorHooks
public class FederatedSchemaGeneratorHooks implements SchemaGeneratorHooks
Hooks for generating federated GraphQL schema.
-
-
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 KotlinDirectiveWiringFactory
getWiringFactory()
GraphQLType
willGenerateGraphQLType(KType type)
Add support for _FieldSet scalar to the schema. GraphQLDirective
willGenerateDirective(DirectiveMetaInformation directiveInfo)
GraphQLType
didGenerateGraphQLType(KType type, GraphQLType generatedType)
GraphQLSchema.Builder
willBuildSchema(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.federation.FederatedSchemaGeneratorHooks
didGenerateMutationField, didGenerateMutationObject, didGenerateQueryField, didGenerateSubscriptionField, didGenerateSubscriptionObject, 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
-
getWiringFactory
KotlinDirectiveWiringFactory getWiringFactory()
-
willGenerateGraphQLType
GraphQLType willGenerateGraphQLType(KType type)
Add support for _FieldSet scalar to the schema.
-
willGenerateDirective
GraphQLDirective willGenerateDirective(DirectiveMetaInformation directiveInfo)
-
didGenerateGraphQLType
GraphQLType didGenerateGraphQLType(KType type, GraphQLType generatedType)
-
willBuildSchema
GraphQLSchema.Builder willBuildSchema(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 willBuildSchema, query has to have at least one single field.
Add federated _service query to ensure it is a valid GraphQL schema.
-
-
-
-