GraphQL Code Libraries, Tools and Services
graphql
client variable like so:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
We currently have no publicly accessible Ruby SDK library, so it may be beneficial for you to use one of the various GraphQL clients as provided through the link below, or to setup your own.
# Install the following gems beforehand and require them
require 'httparty'
require 'json'
# Setup the GraphQL API client in Ruby
class KanaGraphqlClient
def initialize(api_key)
@api_key = api_key
end
def execute(query:, variables: nil)
HTTParty.post(
"https://api.usekana.com/graphql",
headers: {
'Content-Type' => 'application/json',
'Authorization' => @api_key
},
body: {
query: query,
variables: variables
}.to_json
)
end
end
client variable like so:
client = KanaGraphqlClient.new(#{API_KEY})