クラス FederationSchemaFactory
java.lang.ObjectSE
org.springframework.graphql.data.method.annotation.support.AnnotatedControllerDetectionSupport<FederationSchemaFactory.EntityMappingInfo>
org.springframework.graphql.data.federation.FederationSchemaFactory
- 実装済みのインターフェース一覧:
Aware、InitializingBean、ApplicationContextAware
public final class FederationSchemaFactory
extends AnnotatedControllerDetectionSupport<FederationSchemaFactory.EntityMappingInfo>
Spring 構成で宣言されたコントローラー上の
@EntityMapping ハンドラーメソッドを検出し、GraphQLSchema または SchemaTransformer を作成するためのファクトリメソッドを提供します。 このクラスは、Spring 構成で Bean として宣言され、GraphQlSource.SchemaResourceBuilder.schemaFactory(BiFunction) を介してプラグインされることを目的としています。
- 導入:
- 1.3.0
- 作成者:
- Rossen Stoyanchev
- 関連事項:
ネストされたクラスの概要
ネストされたクラスフィールド概要
クラス org.springframework.graphql.data.method.annotation.support.AnnotatedControllerDetectionSupport から継承されたフィールド
logger, springSecurityPresentコンストラクター概要
コンストラクター方法の概要
修飾子と型メソッド説明voidgraphql.schema.GraphQLSchemacreateGraphQLSchema(graphql.schema.idl.TypeDefinitionRegistry registry, graphql.schema.idl.RuntimeWiring wiring) SchemaTransformerを介してGraphQLSchemaを作成し、フェデレーション型用の "_entities"DataFetcherおよびTypeResolverを設定します。com.apollographql.federation.graphqljava.SchemaTransformercreateSchemaTransformer(graphql.schema.idl.TypeDefinitionRegistry registry, graphql.schema.idl.RuntimeWiring wiring) SchemaTransformerで追加のメソッドを呼び出すことができるcreateGraphQLSchema(TypeDefinitionRegistry, RuntimeWiring)の代替。protected HandlerMethodprotected @Nullable FederationSchemaFactory.EntityMappingInfogetMappingInfo(MethodSE method, ObjectSE handler, ClassSE<?> handlerType) protected HandlerMethodArgumentResolverCompositevoidsetTypeResolver(@Nullable graphql.schema.TypeResolver typeResolver) Java をエンティティスキーマ型名にマッピングするのに役立つリゾルバーを構成します。クラス org.springframework.graphql.data.method.annotation.support.AnnotatedControllerDetectionSupport から継承されたメソッド
addFormatterRegistrar, configureBinder, createHandlerMethod, detectHandlerMethods, getApplicationContext, getArgumentResolvers, getBinderOptions, getConversionService, getExceptionResolver, getExecutor, isFallBackOnDirectFieldAccess, obtainApplicationContext, setApplicationContext, setBinderOptions, setBlockingMethodPredicate, setControllerPredicate, setExecutor, setFallBackOnDirectFieldAccess, shouldInvokeAsync
コンストラクターの詳細
FederationSchemaFactory
public FederationSchemaFactory()
方法の詳細
setTypeResolver
public void setTypeResolver(@Nullable graphql.schema.TypeResolver typeResolver) Java をエンティティスキーマ型名にマッピングするのに役立つリゾルバーを構成します。デフォルトでは、これは
ClassNameTypeResolverです。- パラメーター:
typeResolver- 使用するカスタム型リゾルバー- 関連事項:
afterPropertiesSet
public void afterPropertiesSet()- 次で指定:
- インターフェース
InitializingBean内のafterPropertiesSet - オーバーライド:
- クラス
AnnotatedControllerDetectionSupport<FederationSchemaFactory.EntityMappingInfo>のafterPropertiesSet
initArgumentResolvers
getMappingInfo
protected @Nullable FederationSchemaFactory.EntityMappingInfo getMappingInfo(MethodSE method, ObjectSE handler, ClassSE<?> handlerType) getHandlerMethod
createGraphQLSchema
public graphql.schema.GraphQLSchema createGraphQLSchema(graphql.schema.idl.TypeDefinitionRegistry registry, graphql.schema.idl.RuntimeWiring wiring) SchemaTransformerを介してGraphQLSchemaを作成し、フェデレーション型用の "_entities"DataFetcherおよびTypeResolverを設定します。これを使用して
schemaFactoryを供給します。- パラメーター:
registry- 既存の型定義レジストリwiring- 既存のランタイム接続
createSchemaTransformer
public com.apollographql.federation.graphqljava.SchemaTransformer createSchemaTransformer(graphql.schema.idl.TypeDefinitionRegistry registry, graphql.schema.idl.RuntimeWiring wiring) SchemaTransformerで追加のメソッドを呼び出すことができるcreateGraphQLSchema(TypeDefinitionRegistry, RuntimeWiring)の代替。- パラメーター:
registry- 既存の型定義レジストリwiring- 既存のランタイム接続