Load multiple GraphQL schema files
Prior to this commit, the `spring.graphql.schema.location` would only allow a single file as the source for the GraphQL schema. This commit changes this configuration to `spring.graphql.schema.locations` so that it accepts actual locations (folders) and scans for `*.graphqls` files in those locations. All files are parsed and merged as a single GraphQL `TypeDefinitionRegistry`. Closes gh-56
This commit is contained in:
@@ -119,8 +119,8 @@ The Spring GraphQL project offers a few configuration properties to customize yo
|
||||
````properties
|
||||
# web path to the graphql endpoint
|
||||
spring.graphql.path=/graphql
|
||||
# location of the graphql schema file
|
||||
spring.graphql.schema.location=classpath:graphql/schema.graphqls
|
||||
# locations of the graphql '*.graphqls' schema files
|
||||
spring.graphql.schema.locations=classpath:graphql/
|
||||
# schema printer endpoint configuration
|
||||
# endpoint path is concatenated with the main path, so "/graphql/schema" by default
|
||||
spring.graphql.schema.printer.enabled=false
|
||||
|
||||
Reference in New Issue
Block a user