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.

Comment From: xenoterracide

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" 😜

Comment From: bclozel

I have tried various approaches, unsuccessfully: * logging anything during the condition processing is way too early in the process and could be logged multiple times if the condition is reused elsewhere * we can't log anything in the GraphQlAutoConfiguration itself as the condition includes all known use cases (schema resources on the classpath, custom beans, etc).

I guess debugging the application will output the auto-configuration report and this is the best way to find out why auto-configuration did not set up expected infrastructure. This is not specific to GraphQL support.