mirror of
https://github.com/andwati/telecom-platform.git
synced 2026-10-19 11:32:53 +00:00
15 lines
306 B
Ruby
15 lines
306 B
Ruby
module TelecomSDK
|
|
# API for GraphQL queries
|
|
class GraphQLAPI
|
|
def initialize(client)
|
|
@client = client
|
|
end
|
|
|
|
def execute(query, variables = nil)
|
|
request = { query: query }
|
|
request[:variables] = variables if variables
|
|
@client.post("/graphql", request)
|
|
end
|
|
end
|
|
end
|