diff --git a/spring-graphql-docs/src/docs/asciidoc/index.adoc b/spring-graphql-docs/src/docs/asciidoc/index.adoc index 92f61133..9c0ccd75 100644 --- a/spring-graphql-docs/src/docs/asciidoc/index.adoc +++ b/spring-graphql-docs/src/docs/asciidoc/index.adoc @@ -188,7 +188,6 @@ support for <>, <>, and <>. - [[execution-graphqlsource-schema-resources]] ==== Schema Resources @@ -200,6 +199,27 @@ via `FileSystemResource`, to byte content via `ByteArrayResource`, or implement `Resource` that loads schema files from a remote location or storage. +[[execution-graphqlsource-schema-creation]] +==== Schema Creation + +By default, `GraphQlSource.Builder` uses the GraphQL Java `GraphQLSchemaGenerator` to +create the `graphql.schema.GraphQLSchema`. This works for most applications, but if +necessary, you can hook into the schema creation through the builder: + +[source,java,indent=0,subs="verbatim,quotes"] +---- +GraphQlSource graphQlSource = GraphQlSource.builder() + .schemaResources(..) + .configureRuntimeWiring(..) + .schemaFactory((typeDefinitionRegistry, runtimeWiring) -> { + // create `GraphQLSchema` + }) + .build(); +---- + +The primary reason for this is to create the schema through a federation library. + + [[execution-graphqlsource-runtimewiring-configurer]] ==== `RuntimeWiringConfigurer`