Sha256: 9bd938f6a060f4a11bcdb92542cf7ca6a499164c0b58295f518dd73faff08a5b
Contents?: true
Size: 879 Bytes
Versions: 12
Compression:
Stored size: 879 Bytes
Contents
module Ecoportal module API class GraphQL module Base class Connection < Ecoportal::API::GraphQL::Base::Model class GenericNode def initialize(*args, **kargs) raise "Missuse error. You should define a node_class for a class that inherits from GraphqlConnection class." end end include Enumerable class_resolver :node_class, GenericNode passthrough :edges passthrough :totalCount embeds_many :nodes, klass: :node_class embeds_one :pageInfo, klass: Ecoportal::API::GraphQL::Base::PageInfo def empty? count < 1 end def each(&block) return to_enum(:each) unless block nodes.each(&block) end end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems