-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve reference docs on how to find schema files acorss multiple modules #489
Comments
Does the following work for your application?
|
Thank you! Adding |
I think we can improve the Javadoc a bit. |
Thanks for reopening this issue @rstoyanchev - this has appeared again in the Spring Boot issue tracker as well, see spring-projects/spring-boot#31772. I'm thinking this happens often enough that we should reconsider the default property value in Spring Boot 3.0 to switch to using |
I couldn't find anywhere in the documentation (or examples) how to include schema file from imported maven modules.
Background: We have an external project with the entities (models) and pull it in as a maven dependency. The graphqls schema files with the type declarations for each entity lives in that project.
Using legacy GraphQL Java Kickstart it automatically picked up
graphqls
schema files from maven dependencies (imported jars). Is there a way to do this using newspring-boot-starter-graphql
?I uploaded a demo project showing what we are trying to do. Right now the schema file in the
app
module is being picked up (highlighted in green) but the schema in theapp
module's dependencyanimals
module is not being picked up (highlighted in red).When I move the the schema file in the
animals
module to the app module (renaming it toschema2.graphql
) it works.I tried using
spring.graphql.schema.locations=classpath:/graphql/,BOOT-INF/lib/animals-0.0.1-SNAPSHOT.jar!/graphql/
using the path to the schema files from the jar but it didn't work.Also tried using the default (not specifying in my application properties at all) but didn't work.
The text was updated successfully, but these errors were encountered: