class GQLi::Subscription

Subscription node

Public Instance Methods

__execute(client) click to toggle source

Delegates itself to the client to be executed

# File lib/gqli/subscription.rb, line 18
def __execute(client)
  client.execute(self)
end
to_gql() click to toggle source

Serializes to a GraphQL string

# File lib/gqli/subscription.rb, line 7
    def to_gql
      result = <<~GQL
        subscription #{__name ? __name + ' ' : ''}{
        #{__nodes.map(&:to_gql).join("\n")}
        }
      GQL

      result.lstrip
    end
to_s() click to toggle source

Serializes to a GraphQL string

# File lib/gqli/subscription.rb, line 23
def to_s
  to_gql
end