Hi I have a Graphql Request which I want to send using RestClient, can anyone please give me suggestion How can I do it I want something like in this form
response = RestClient.post("http://localhost:3000/graphql", default_headers,payload) Because in below method I am using Graphlient::Client which is using a lot of the memory.
def make_request(id)
client = Graphlient::Client.new("http:localhost:3000/graphql", headers: {
'Authorization': "API #{@api_key}"
})
query = <<-GRAPHQL
query ($input: FilterInput, $first: Int) {
filterLocations(input: $input, first: $first) {
edges {
cursor
node {
id
attributes{
name
value
}
photos{
fileSize
id
name
}
business{
start
end
}
city
country
GRAPHQL
variables = {
"first": 1,
"input": {
"attributes": [
{
"name": "test",
"value": [
id
]
}
]
}
}
end