2

I started creating a standard grapnel api following this tutorial and everything worked. Then I used spring-boot-graphql-spqr to get rid of the schema.graphql file and also the controller as the tutorial states. now, however, in the console there is no sign that any graphql service started and also whether the \graphql nor the \graphiql endpoint exists. What is the problem here?

The whole project is in the TestModelDeleted branch of https://github.com/WoistdasNiveau/GraphiqlDemo.git

I really do not understand why this does not work what am I doing wrong?

UPDATE: The \graphql endpoint exists but why don't i get the \graphiql endpoint anymore?

Yann39
  • 14,285
  • 11
  • 56
  • 84
  • I can't find any schema generation in your code ? You have to generate the schema using `GraphQLSchemaGenerator` as stated in the documentation. You need to create a controller that will be responsible of handling requests to the /graphql endpoint. – Yann39 May 03 '23 at 18:37
  • In 4.2 it is stated that the controlelr is not needed anymore and with postman i can make queries and mutations and it works, however, i cannot access \graphiql still. – WoistdasNiveau May 03 '23 at 18:39
  • Oh OK, didn't know that, I still use the controller. I do not use graphiql, I will give it a try later to see if I can reproduce the problem. – Yann39 May 03 '23 at 19:01
  • 1
    I can reproduce the problem in my project, the `/graphiql` endpoint gives me a 404 when enabled in the properties along with SPQR (even if defining another path using `spring.graphql.graphiql.path` property). If I remove SPQR stuff and add back a _schema.graphqls_ file, then the `/graphiql` endpoint works fine. No time to go further today, but for sure I will investigate this later, nice catch ! – Yann39 May 03 '23 at 19:24
  • The Spring GraphQL starter and the GraphQL SPQR starter are not intended to work together. It's certainly possible, but they're not ware of each other... So your project is in a strange state where some GraphQL features are served by Spring GraphQL, and others by SPQR. – kaqqao Jun 02 '23 at 14:17
  • Oh does that mean i can remove graphql-starter? – WoistdasNiveau Jun 03 '23 at 15:17

0 Answers0