ExpediaGroup / graphql-kotlin

Libraries for running GraphQL in Kotlin
https://opensource.expediagroup.com/graphql-kotlin/
Apache License 2.0
1.74k stars 349 forks source link

Can't access /graphql endpoint - getting 400 #382

Closed SyedAsimAliSE closed 5 years ago

SyedAsimAliSE commented 5 years ago

Hi,

i just copied spring example into my spring-boot project and included everything along with resource/graphql-playground.html file, everything is working i can see the schema generation in the logs :

image

but i am unable to run Playground in the browser : http://localhost:8080/graphql

i am getting HTTP ERROR 400 .

am i missing something in the configurations ?

thanks

dariuszkuc commented 5 years ago

/graphl endpoint is an endpoint for posting your queries (you can use either do GET on it with query parameters or POST the body of the request).

Our example app configures Playground under /playground (https://github.com/ExpediaGroup/graphql-kotlin/blob/master/examples/spring/src/main/kotlin/com/expediagroup/graphql/examples/RoutesConfiguration.kt#L32)

SyedAsimAliSE commented 5 years ago

ahh my bad i was used to NodeJS ApolloServer way to hit /graphql enpoint.

thank you for quick response :) i missed to read the router configs