leangen / graphql-spqr-spring-boot-starter

Spring Boot 2 starter powered by GraphQL SPQR
Apache License 2.0
275 stars 68 forks source link

failed to request http://localhost:8080/graphql caused by graphql.AssertException: query can't be null #134

Closed lucStev1n closed 1 year ago

lucStev1n commented 1 year ago

springboot version: 2.7.10

dependencies: R9`3~JP9{GEJAP$4ILV FRT

service: )7{AW9F{KHHZX8VYB$_`CG7

kaqqao commented 1 year ago

The error says you didn't send a query. Did you?

Looks like you sent an empty GET request to /graphql, which is indeed invalid. See the graphql-over-http protocol. In short, you should be sending a POST with a JSON body with at least the query field. It's easier to use a GraphQL client, like Altair, during development.