Sha256: 753785e0191f895561882dee9a328981dabb5cd069a42b2aaa2c46fe7daf5ec9

Contents?: true

Size: 1.25 KB

Versions: 5

Compression:

Stored size: 1.25 KB

Contents

module Ecoportal
  module API
    class GraphQL
      module Query
        class Actions < Ecoportal::API::GraphQL::Logic::QueryConnection
          field_name :actions

          class_resolver :item_class, Ecoportal::API::GraphQL::Model::Action
          class_resolver :connection_class, Ecoportal::API::GraphQL::Connection::Action

          private

          def basic_block(&block)
            connection_block = block || default_connection_block
            proc {
              query(searchConf: :Search, after: :string, before: :string, first: :int, last: :int) {
                currentOrganization {
                  actions(
                    searchConf: :searchConf,
                    after: :after,
                    before: :before,
                    first: :first,
                    last: :last,
                    &connection_block
                  )
                }
              }
            }
          end

          def default_connection_block
            proc {
              ___Ecoportal__API__GraphQL__Fragment__Pagination
              nodes {
                ___Ecoportal__API__GraphQL__Fragment__Action
              }
            }
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ecoportal-api-graphql-0.4.3 lib/ecoportal/api/graphql/query/actions.rb
ecoportal-api-graphql-0.4.2 lib/ecoportal/api/graphql/query/actions.rb
ecoportal-api-graphql-0.4.1 lib/ecoportal/api/graphql/query/actions.rb
ecoportal-api-graphql-0.4.0 lib/ecoportal/api/graphql/query/actions.rb
ecoportal-api-graphql-0.3.16 lib/ecoportal/api/graphql/query/actions.rb