io.vertx.ext.web.handler.graphql

## Class GraphiQLHandlerOptions

- java.lang.Object
- - io.vertx.ext.web.handler.graphql.GraphiQLHandlerOptions

-     public class GraphiQLHandlerOptions
      extends Object

  Embedded GraphiQL user interface options.
  Author:
    Thomas Segismont

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static boolean` | `DEFAULT_ENABLED` Whether GraphiQL development tool should be enabled by default = false.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GraphiQLHandlerOptions()` Default constructor.
    `GraphiQLHandlerOptions(GraphiQLHandlerOptions other)` Copy constructor.
    `GraphiQLHandlerOptions(JsonObject json)` Constructor to create options from JSON.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getGraphQLUri()`
    `Map<String,String>` | `getHeaders()`
    `String` | `getQuery()`
    `JsonObject` | `getVariables()`
    `boolean` | `isEnabled()`
    `GraphiQLHandlerOptions` | `setEnabled(boolean enabled)` Whether the GraphiQL development tool should be enabled.
    `GraphiQLHandlerOptions` | `setGraphQLUri(String graphQLUri)` Set the GraphQL endpoint URI.
    `GraphiQLHandlerOptions` | `setHeaders(Map<String,String> headers)` A fixed set of HTTP headers to add to GraphiQL requests.
    `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.
    `JsonObject` | `toJson()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_ENABLED

          public static final boolean DEFAULT_ENABLED

      Whether GraphiQL development tool should be enabled by default = false.

  - ### Constructor Detail

    - #### GraphiQLHandlerOptions

          public GraphiQLHandlerOptions()

      Default constructor.

    - #### GraphiQLHandlerOptions

          public GraphiQLHandlerOptions(GraphiQLHandlerOptions other)

      Copy constructor.
      Parameters:
        `other` - the options to copy

    - #### GraphiQLHandlerOptions

          public GraphiQLHandlerOptions(JsonObject json)

      Constructor to create options from JSON.
      Parameters:
        `json` - the JSON

  - ### Method Detail

    - #### toJson

          public JsonObject toJson()

      Returns:
        a JSON representation of these options

    - #### isEnabled

          public boolean isEnabled()

      Returns:
        true if the GraphiQL development tool should be enabled, false otherwise

    - #### setEnabled

          public GraphiQLHandlerOptions setEnabled(boolean enabled)

      Whether the GraphiQL development tool should be enabled. Defaults to `false`.
      Parameters:
        `enabled` - true to enable the GraphiQL development tool, false otherwise
      Returns:
        a reference to this, so the API can be used fluently

    - #### getGraphQLUri

          public String getGraphQLUri()

      Returns:
        the GraphQL endpoint URI

    - #### setGraphQLUri

          public GraphiQLHandlerOptions setGraphQLUri(String graphQLUri)

      Set the GraphQL endpoint URI. Defaults to the path used to get the GraphiQL user interface.
      Parameters:
        `graphQLUri` - the GraphQL endpoint URI
      Returns:
        a reference to this, so the API can be used fluently

    - #### getHeaders

          public Map<String,String> getHeaders()

      Returns:
        the fixed set of HTTP headers to add to GraphiQL requests

    - #### setHeaders

          public GraphiQLHandlerOptions setHeaders(Map<String,String> headers)

      A fixed set of HTTP headers to add to GraphiQL requests. Defaults to `null`.
      Parameters:
        `headers` - the set of HTTP headers to add to GraphiQL requests
      Returns:
        a reference to this, so the API can be used fluently

    - #### getQuery

          public String getQuery()

      Returns:
        the query to set as initial value in the GraphiQL user interface

    - #### setQuery

          public GraphiQLHandlerOptions setQuery(String query)

      Initial value of the query area in the GraphiQL user interface. Defaults to `null`.
      Parameters:
        `query` - the query to set as initial value
      Returns:
        a reference to this, so the API can be used fluently

    - #### getVariables

          public JsonObject getVariables()

      Returns:
        the variables to set as initial value in the GraphiQL user interface

    - #### setVariables

          public GraphiQLHandlerOptions setVariables(JsonObject variables)

      Initial value of the variables area in the GraphiQL user interface. Defaults to `null`.
      Parameters:
        `variables` - the variables to set as initial value
      Returns:
        a reference to this, so the API can be used fluently

Copyright © 2022 Eclipse. All rights reserved.