Sha256: 5c13cb2dbbbfc66f37f0c9531310a0fea0358c1cc065b37fd3a51f0f448c4340
Contents?: true
Size: 501 Bytes
Versions: 13
Compression:
Stored size: 501 Bytes
Contents
# frozen_string_literal: true require 'rackup' require 'json' require 'graphql' require_relative './helpers' class RemoteApp def call(env) params = apollo_upload_server_middleware_params(env) result = RemoteSchema.execute( query: params["query"], variables: params["variables"], operation_name: params["operationName"], ) [200, {"content-type" => "application/json"}, [JSON.generate(result)]] end end Rackup::Handler.default.run(RemoteApp.new, :Port => 3001)
Version data entries
13 entries across 13 versions & 1 rubygems