GraphQL uses POST
for queries
POST /query HTTP/1.1
Content-Type: application/graphql
{
hero {
friends {
id
name
height
}
}
}
Elasticsearch uses GET
with body for queries
GET /_search HTTP/1.1
{
"query": {
"bool": {
"must": [
{ "match": { "title": "Search" }},
{ "match": { "content": "Elasticsearch" }}
],
"filter": [
{ "term": { "status": "published" }},
{ "range": { "publish_date": { "gte": "2015-01-01" }}}
]
}
}
}
SEARCH /search HTTP/1.1
ETag: df3049812
…
- @jasnell has written a draft
- We need a way to do HTTP body queries without killing cache