Class GraphiQlHandler
java.lang.Object
org.springframework.graphql.server.webmvc.GraphiQlHandler
Spring MVC handler to serve a GraphiQl UI page.
- Since:
- 1.0.0
- Author:
- Brian Clozel, Rossen Stoyanchev
- 
Constructor SummaryConstructorsConstructorDescriptionGraphiQlHandler(String graphQlPath, String graphQlWsPath) Constructor that serves the defaultgraphiql/index.htmlincluded in thespring-graphqlmodule.GraphiQlHandler(String graphQlPath, String graphQlWsPath, Resource htmlResource) Constructor with the HTML page to serve.
- 
Method SummaryModifier and TypeMethodDescriptionhandleRequest(ServerRequest request) Render the GraphiQL page as "text/html", or if the "path" query parameter is missing, add it and redirect back to the same URL.
- 
Constructor Details- 
GraphiQlHandlerConstructor that serves the defaultgraphiql/index.htmlincluded in thespring-graphqlmodule.- Parameters:
- graphQlPath- the path to the GraphQL HTTP endpoint
- graphQlWsPath- optional path to the GraphQL WebSocket endpoint
 
- 
GraphiQlHandlerConstructor with the HTML page to serve.- Parameters:
- graphQlPath- the path to the GraphQL HTTP endpoint
- graphQlWsPath- optional path to the GraphQL WebSocket endpoint
- htmlResource- the GraphiQL page to serve
 
 
- 
- 
Method Details- 
handleRequestRender the GraphiQL page as "text/html", or if the "path" query parameter is missing, add it and redirect back to the same URL.- Parameters:
- request- the HTTP server request
 
 
-