Open bclozel opened 2 weeks ago
I mean I found the whole whole not setting up the server a little weird if no schema files are found. Kind of feels like a do it anyway... Maybe something should always be there.
Is a 404 the right answer? Or should you set up an empty schema endpoint and queries always error.
" Why is nobody having fun. I specifically requested it" 😜
See spring-projects/spring-graphql#1002 for background.
Using the GraphQL and Web starters to build REST API that uses a GraphQL client is perfectly valid use case. Right now the GraphQL auto-configuration will build a GraphQL service only if a schema file has been detected, or a GraphQlSource has been contributed to the application. In some cases, developers are getting confused about this situation.
During startup we log a message with the schema information we have detected. We should consider logging a message if no schema was found. Note, we should only do this if there is a consistent way to do this during startup, not too early in the process.