I am using Java 21 with Spring Boot 3.2 and using
implementation "org.springframework.boot:spring-boot-starter-graphql:3.2.0"
I can run my project in IntelliJ and it works just fine:
2024-01-17T12:46:39.570Z [] INFO o.s.b.a.g.GraphQlAutoConfiguration - GraphQL schema inspection:
Unmapped fields: {}
Unmapped registrations: {}
Skipped types: []
But it does not work when I run it in my terminal:
2024-01-17T12:49:13.972Z [] INFO o.s.b.a.g.GraphQlAutoConfiguration - GraphQL schema inspection:
Unmapped fields: {Query=[myQuery, myOtherQuery], Mutation=[myMutation, myOtherMutation]}
Unmapped registrations: {}
Skipped types: []
I am using ./gradlew bootRun to run through the terminal.
Am I missing an argument that I need to include?
I can send requests to the application running in my IDE and it works as expected, but I get errors when I send requests while the app is running in the terminal:
"message": "The field at path '/myQuery' was declared as a non null type, but the code involved in retrieving data has wrongly returned a null value. The graphql specification requires that the parent field be set to null, or if that is non nullable that it bubble up null to its parent and so on. The non-nullable type is '[MyRequestedClass]' within parent type 'Query'",