Documentation
Plugins
HTTP GET

HTTP GET

The http_get plugin allows you to expose your GraphQL API over HTTP GET requests. This feature is fully compliant with the GraphQL over HTTP specification.

By enabling this plugin, you can execute GraphQL queries and mutations over HTTP GET requests, using HTTP query parameters, for example:

GET /graphql?query=query%20%7B%20__typename%20%7D

Query Parameters

For complete documentation of the supported query parameters, see the GraphQL over HTTP specification.

  • query: The GraphQL query to execute

  • variables (optional): A JSON-encoded string containing the GraphQL variables

  • operationName (optional): The name of the GraphQL operation to execute

Headers

To execute GraphQL queries over HTTP GET requests, you must set the Content-Type header to application/json, or the Accept header to application/x-www-form-urlencoded / application/graphql-response+json.

Configuration

Examples

YAML

config: {}
enabled: true
type: "http_get"

JSON

{
  "config": {},
  "enabled": true,
  "type": "http_get"
}

Reference

mutations
boolean
optional
default: false

Allow mutations over GET requests.

The option is disabled by default: this restriction is necessary to conform with the long-established semantics of safe methods within HTTP.