Class: Upwork::Api::Routers::Graphql

Inherits:
Object
  • Object
show all
Defined in:
lib/upwork/api/routers/graphql.rb

Overview

Execute GraphQL requests

Constant Summary collapse

ENTRY_POINT =
'graphql'

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Graphql

Init

Arguments:

client: (Client)


25
26
27
28
# File 'lib/upwork/api/routers/graphql.rb', line 25

def initialize(client)
  @client = client
  @client.epoint = ENTRY_POINT 
end

Instance Method Details

#execute(params) ⇒ Object

Execute GraphQL request



31
32
33
34
# File 'lib/upwork/api/routers/graphql.rb', line 31

def execute(params)
  $LOG.i "running " + __method__.to_s
  @client.post '', params
end