From 8f9323d66c7bccec8c2f579ab535e0b0308b49cc Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Wed, 21 Sep 2022 21:09:22 +0200 Subject: [PATCH] Document "classpath:*" location for GraphQL Schemas This commit mentions the `"classpath*:graphql/**` schema location in case the application needs to find schemas across multiple classpath roots, for example across multiple modules. Closes gh-31772 --- .../spring-boot-docs/src/docs/asciidoc/web/spring-graphql.adoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/web/spring-graphql.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/web/spring-graphql.adoc index 452df0f4aeb..d14001862f6 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/web/spring-graphql.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/web/spring-graphql.adoc @@ -35,6 +35,9 @@ A Spring GraphQL application requires a defined schema at startup. By default, you can write ".graphqls" or ".gqls" schema files under `src/main/resources/graphql/**` and Spring Boot will pick them up automatically. You can customize the locations with configprop:spring.graphql.schema.locations[] and the file extensions with configprop:spring.graphql.schema.file-extensions[]. +NOTE: If you want Spring Boot to detect schema files in all your application modules and dependencies for that location, +you can set configprop:spring.graphql.schema.locations[] to `+"classpath*:graphql/**/"+` (note the `classpath*:` prefix). + In the following sections, we'll consider this sample GraphQL schema, defining two types and two queries: [source,json,indent=0,subs="verbatim,quotes"]