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 Summary
ConstructorDescriptionGraphiQlHandler
(String graphQlPath, String graphQlWsPath) Constructor that serves the defaultgraphiql/index.html
included in thespring-graphql
module.GraphiQlHandler
(String graphQlPath, String graphQlWsPath, Resource htmlResource) Constructor with the HTML page to serve. -
Method Summary
Modifier 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
-
GraphiQlHandler
Constructor that serves the defaultgraphiql/index.html
included in thespring-graphql
module.- Parameters:
graphQlPath
- the path to the GraphQL HTTP endpointgraphQlWsPath
- optional path to the GraphQL WebSocket endpoint
-
GraphiQlHandler
Constructor with the HTML page to serve.- Parameters:
graphQlPath
- the path to the GraphQL HTTP endpointgraphQlWsPath
- optional path to the GraphQL WebSocket endpointhtmlResource
- the GraphiQL page to serve
-
-
Method Details
-
handleRequest
Render the GraphiQL page as "text/html", or if the "path" query parameter is missing, add it and redirect back to the same URL.
-