Sha256: 5e2787e01d586a1c961a725df7532a41bc9f6bb532705636aff76a9c3d722371
Contents?: true
Size: 880 Bytes
Versions: 14
Compression:
Stored size: 880 Bytes
Contents
module Ecoportal module API class GraphQL module Logic 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
14 entries across 14 versions & 1 rubygems