Class FederatedSchemaGeneratorHooks
-
- All Implemented Interfaces:
-
com.expediagroup.graphql.generator.hooks.SchemaGeneratorHooks
public class FederatedSchemaGeneratorHooks extends FlowSubscriptionSchemaGeneratorHooksHooks for generating federated GraphQL schema.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classFederatedSchemaGeneratorHooks.LinkSpec
-
Field Summary
Fields Modifier and Type Field Description private final KotlinDirectiveWiringFactorywiringFactory
-
Constructor Summary
Constructors Constructor Description FederatedSchemaGeneratorHooks(List<FederatedTypeResolver> resolvers, Boolean optInFederationV2)
-
Method Summary
Modifier and Type Method Description GraphQLSchema.BuilderwillBuildSchema(List<TopLevelObject> queries, List<TopLevelObject> mutations, List<TopLevelObject> subscriptions, Set<KType> additionalTypes, Set<KType> additionalInputTypes, TopLevelObject schemaObject)GraphQLTypewillGenerateGraphQLType(KType type)Add support for FieldSet and LinkImport scalars to the schema. GraphQLDirectivewillGenerateDirective(DirectiveMetaInformation directiveInfo)GraphQLAppliedDirectivewillApplyDirective(DirectiveMetaInformation directiveInfo, GraphQLDirective directive)GraphQLTypedidGenerateGraphQLType(KType type, GraphQLType generatedType)GraphQLDirectivedidGenerateDirective(DirectiveMetaInformation directiveInfo, GraphQLDirective directive)GraphQLSchema.BuilderdidBuildSchema(GraphQLSchema.Builder builder)GraphQLObjectTypedidGenerateQueryObject(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, isValidSuperclass, onRewireGraphQLType, willAddGraphQLTypeToSchema, willResolveInputMonad -
Methods inherited from class com.expediagroup.graphql.generator.hooks.FlowSubscriptionSchemaGeneratorHooks
isValidSubscriptionReturnType, 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.
-
-
-
-