-
Notifications
You must be signed in to change notification settings - Fork 322
Description
Hi Spring for GraphQL team,
First, thank you for the excellent work on this project. The deep integration with the Spring ecosystem is fantastic and provides a solid foundation for building GraphQL APIs.
We understand that spring-boot-starter-graphql
was intentionally designed with a Schema-First philosophy, where the .graphqls
schema file serves as the single source of truth and the contract for the API. This approach has clear benefits, especially in large, distributed teams.
However, in our development workflow, we often find that a Code-First approach offers significant advantages in terms of development speed and maintainability. Generating the schema directly from annotated Java code eliminates the need to keep two sources of truth (the schema and the Java DTOs/services) in sync, reducing boilerplate and preventing drift between the API contract and its implementation.
We are aware of third-party libraries in the ecosystem like GraphQL SPQR that provide this functionality.
The existence and popularity of these libraries show a strong interest in the Java community for the Code-First development model.
This leads to our question:
Has there been any internal discussion, or are there any long-term plans, to officially support a Code-First model directly within the spring-graphql
project?
Having an official, tightly-integrated Code-First option would be a powerful feature for many developers and teams who prefer this paradigm, allowing them to stay within the official Spring project ecosystem without needing third-party wrappers.
We would be very interested to hear the team's thoughts on this topic, your reasoning behind the schema-first choice, and your vision for the future of the project in this regard.
Thank you for your time and for all your great work on the Spring Framework.