Netflix DGS configuration dgs.graphql.graphiql.enabled=true is not working

340 Views Asked by At

Netflix DGS configuration dgs.graphql.graphiql.enabled=true is not working.

I have also added this config - dgs.graphql.graphiql.path=/graphiql

I have a spring boot application in maven and I have implemented my graphQL APIs using Netflix DGS. APIs are working fine using postman but when I try to enable graphiql by hitting /graphiql end point, it gives me the below error.

Error -


javax.servlet.ServletException: Could not resolve view with name 'forward:/graphiql/index.html' in servlet with name 'dispatcherServlet'
    at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1385)
    

Can anyone please help me resolve this issue.

1

There are 1 best solutions below

0
Rohan pawar On

I was facing this issue as there was web MVC enabled using the annotation @EnableWebMvc.

By disabling it, spring boot automatically manages this configuration, and graphql playbook is now accessible on /graphiql end point.