Only scan for *.graphqls and *.gqls schema files

Prior to this commit, the auto-configuration was scanning for
`"*.graphql,*.gql,*.graphqls,*.gqls"` files in the configured locations.
This was not flexible enough, as developers could not customize the
considered file extensions when scanning for files.

This commit provides a new `spring.graphql.schema.file-extensions`
configuration property that enables such customizations.

Because `"*.graphql,*.gql"` extensions seem to be tied to queries
(and not schemas), this commit also changes the default value to only
consider the `"*.graphqls,*.gqls"` file extensions by default.

Closes gh-134
Closes gh-135
This commit is contained in:
Brian Clozel
2021-09-20 10:29:41 +02:00
parent 94809537cb
commit f69aa39211
6 changed files with 40 additions and 22 deletions

View File

@@ -1,3 +1,5 @@
management.endpoints.web.exposure.include=health,metrics,info
spring.graphql.schema.printer.enabled=true
spring.graphql.schema.printer.enabled=true
spring.graph