public class GraphiQLHandlerOptions extends Object
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_ENABLED
Whether GraphiQL development tool should be enabled by default = false.
|
static String |
DEFAULT_GRAPHQL_URI
Default URI for HTTP and GraphQLWS endpoints = /graphql.
|
static boolean |
DEFAULT_GRAPHQL_WS_ENABLED
Whether GraphQLWS transport should be enabled by default = true.
|
static boolean |
DEFAULT_HTTP_ENABLED
Whether HTTP transport should be enabled by default = true.
|
Constructor and Description |
---|
GraphiQLHandlerOptions()
Default constructor.
|
GraphiQLHandlerOptions(GraphiQLHandlerOptions other)
Copy constructor.
|
GraphiQLHandlerOptions(JsonObject json)
Constructor to create options from JSON.
|
Modifier and Type | Method and Description |
---|---|
String |
getGraphQLUri() |
String |
getGraphQLWSUri() |
Map<String,String> |
getHeaders() |
String |
getQuery() |
JsonObject |
getVariables() |
JsonObject |
getWsConnectionParams() |
boolean |
isEnabled() |
boolean |
isGraphQLWSEnabled() |
boolean |
isHttpEnabled() |
GraphiQLHandlerOptions |
setEnabled(boolean enabled)
Whether the GraphiQL development tool should be enabled.
|
GraphiQLHandlerOptions |
setGraphQLUri(String graphQLUri)
Set the GraphQL HTTP endpoint URI.
|
GraphiQLHandlerOptions |
setGraphQLWSEnabled(boolean graphQLWSEnabled)
Whether the GraphQLWS transport should be enabled.
|
GraphiQLHandlerOptions |
setGraphWSQLUri(String graphQLWSUri)
Set the GraphQLWS endpoint URI.
|
GraphiQLHandlerOptions |
setHeaders(Map<String,String> headers)
A fixed set of HTTP headers to add to GraphiQL requests.
|
GraphiQLHandlerOptions |
setHttpEnabled(boolean httpEnabled)
Whether the HTTP transport should be enabled.
|
GraphiQLHandlerOptions |
setQuery(String query)
Initial value of the query area in the GraphiQL user interface.
|
GraphiQLHandlerOptions |
setVariables(JsonObject variables)
Initial value of the variables area in the GraphiQL user interface.
|
GraphiQLHandlerOptions |
setWsConnectionParams(JsonObject wsConnectionParams)
Initial GraphQLWS connection params.
|
JsonObject |
toJson() |
public static final boolean DEFAULT_ENABLED
public static final boolean DEFAULT_HTTP_ENABLED
public static final String DEFAULT_GRAPHQL_URI
public static final boolean DEFAULT_GRAPHQL_WS_ENABLED
public GraphiQLHandlerOptions()
public GraphiQLHandlerOptions(GraphiQLHandlerOptions other)
other
- the options to copypublic GraphiQLHandlerOptions(JsonObject json)
json
- the JSONpublic JsonObject toJson()
public boolean isEnabled()
true
if the GraphiQL development tool should be enabled, false
otherwisepublic GraphiQLHandlerOptions setEnabled(boolean enabled)
false
.enabled
- true
to enable the GraphiQL development tool, false
otherwisepublic boolean isHttpEnabled()
true
if the HTTP transport should be enabled, true
otherwisepublic GraphiQLHandlerOptions setHttpEnabled(boolean httpEnabled)
true
.httpEnabled
- true
to enable the HTTP transport, false
otherwisepublic String getGraphQLUri()
public GraphiQLHandlerOptions setGraphQLUri(String graphQLUri)
DEFAULT_GRAPHQL_URI
.graphQLUri
- the GraphQL HTTP endpoint URIpublic boolean isGraphQLWSEnabled()
true
if the GraphQLWS transport should be enabled, true
otherwisepublic GraphiQLHandlerOptions setGraphQLWSEnabled(boolean graphQLWSEnabled)
true
.graphQLWSEnabled
- true
to enable the GraphQLWS transport, false
otherwisepublic String getGraphQLWSUri()
public GraphiQLHandlerOptions setGraphWSQLUri(String graphQLWSUri)
DEFAULT_GRAPHQL_URI
.graphQLWSUri
- the GraphQLWS endpoint URIpublic Map<String,String> getHeaders()
public GraphiQLHandlerOptions setHeaders(Map<String,String> headers)
null
.headers
- the set of HTTP headers to add to GraphiQL requestspublic JsonObject getWsConnectionParams()
public GraphiQLHandlerOptions setWsConnectionParams(JsonObject wsConnectionParams)
null
.wsConnectionParams
- the initial GraphQLWS connection paramspublic String getQuery()
public GraphiQLHandlerOptions setQuery(String query)
null
.query
- the query to set as initial valuepublic JsonObject getVariables()
public GraphiQLHandlerOptions setVariables(JsonObject variables)
null
.variables
- the variables to set as initial valueCopyright © 2024 Eclipse. All rights reserved.