I have the following issues.
introspection request failed : 404error when trying to send requests tohttp://localhost:8080/graphqlusing the altair graphql client.http://localhost/graphiqlis not accessible.
I am new to GraphQL in Spring boot. I am using JDK 17 and IntelliJ Community Edition.
I want to make a GraphQL + Spring boot app with Postgresql. Using the Spring Initializr, I created a project and added the following dependencies.
I also added the following to the application.properties file.
spring.jpa.hibernate.ddl-auto=update
spring.jackson.serialization.fail-on-empty-beans=false
spring.datasource.url=jdbc:postgresql://localhost:5432/demo
spring.datasource.username=demo
spring.datasource.password=demo
When I start this application, I get the following output:
...
Tomcat started on port(s): 8080 (http) with context path ''
Started JavaSpringGraphqlApplication in 4.203 seconds (process running for 4.607)
and when I paste http://localhost:8080/graphql in altair, the console shows the following lines
...
Initializing Spring DispatcherServlet 'dispatcherServlet'
Initializing Servlet 'dispatcherServlet'
Completed initialization in 2 ms
I have worked with Nestjs + GraphQL and it works fine but with Spring boot I can't understand what I am doing wrong. Can someone help me set up this to the point where I can
- set the
localhost:8080/graphqlin altair. - access graphiql or graphql playground.
Ok Let me try help you get setup:
I hope this helps you get started!