ecoportal-api-graphql 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +21 -0
  3. data/.rspec +3 -0
  4. data/.rubocop.yml +55 -0
  5. data/.travis.yml +5 -0
  6. data/.yardopts +10 -0
  7. data/CHANGELOG.md +22 -0
  8. data/Gemfile +6 -0
  9. data/LICENSE +21 -0
  10. data/README.md +20 -0
  11. data/Rakefile +27 -0
  12. data/bin/console +14 -0
  13. data/bin/setup +8 -0
  14. data/bin/setup.ps1 +6 -0
  15. data/ecoportal-api-graphql.gemspec +34 -0
  16. data/lib/ecoportal/api/common/graphql/auth_service.rb +66 -0
  17. data/lib/ecoportal/api/common/graphql/class_helpers.rb +34 -0
  18. data/lib/ecoportal/api/common/graphql/client.rb +43 -0
  19. data/lib/ecoportal/api/common/graphql/doc_helpers.rb +10 -0
  20. data/lib/ecoportal/api/common/graphql/hash_helpers.rb +79 -0
  21. data/lib/ecoportal/api/common/graphql/http_client.rb +84 -0
  22. data/lib/ecoportal/api/common/graphql.rb +15 -0
  23. data/lib/ecoportal/api/common.graphql.rb +8 -0
  24. data/lib/ecoportal/api/graphql/base/action.rb +36 -0
  25. data/lib/ecoportal/api/graphql/base/action_category.rb +13 -0
  26. data/lib/ecoportal/api/graphql/base/connection.rb +33 -0
  27. data/lib/ecoportal/api/graphql/base/contractor_entity.rb +17 -0
  28. data/lib/ecoportal/api/graphql/base/date_time.rb +12 -0
  29. data/lib/ecoportal/api/graphql/base/field.rb +12 -0
  30. data/lib/ecoportal/api/graphql/base/file_attachment.rb +15 -0
  31. data/lib/ecoportal/api/graphql/base/file_container.rb +14 -0
  32. data/lib/ecoportal/api/graphql/base/id_diff_input.rb +11 -0
  33. data/lib/ecoportal/api/graphql/base/model.rb +33 -0
  34. data/lib/ecoportal/api/graphql/base/organization.rb +13 -0
  35. data/lib/ecoportal/api/graphql/base/page.rb +12 -0
  36. data/lib/ecoportal/api/graphql/base/page_info.rb +12 -0
  37. data/lib/ecoportal/api/graphql/base/payload.rb +25 -0
  38. data/lib/ecoportal/api/graphql/base/person_member.rb +20 -0
  39. data/lib/ecoportal/api/graphql/base/query.rb +61 -0
  40. data/lib/ecoportal/api/graphql/base/query_connection.rb +56 -0
  41. data/lib/ecoportal/api/graphql/base/resource.rb +13 -0
  42. data/lib/ecoportal/api/graphql/base/validation_errors.rb +23 -0
  43. data/lib/ecoportal/api/graphql/base.rb +28 -0
  44. data/lib/ecoportal/api/graphql/connection/action.rb +11 -0
  45. data/lib/ecoportal/api/graphql/connection/contractor_entity.rb +11 -0
  46. data/lib/ecoportal/api/graphql/connection/person_member.rb +11 -0
  47. data/lib/ecoportal/api/graphql/connection.rb +12 -0
  48. data/lib/ecoportal/api/graphql/fragment/contractor_entity.rb +19 -0
  49. data/lib/ecoportal/api/graphql/fragment/pagination.rb +17 -0
  50. data/lib/ecoportal/api/graphql/fragment.rb +50 -0
  51. data/lib/ecoportal/api/graphql/input/create_contractor_entity.rb +14 -0
  52. data/lib/ecoportal/api/graphql/input/destroy_contractor_entity.rb +11 -0
  53. data/lib/ecoportal/api/graphql/input/search.rb +13 -0
  54. data/lib/ecoportal/api/graphql/input/search_filter.rb +12 -0
  55. data/lib/ecoportal/api/graphql/input/search_sorter.rb +11 -0
  56. data/lib/ecoportal/api/graphql/input/update_contractor_entity.rb +10 -0
  57. data/lib/ecoportal/api/graphql/input.rb +15 -0
  58. data/lib/ecoportal/api/graphql/model/account.rb +13 -0
  59. data/lib/ecoportal/api/graphql/model/action.rb +21 -0
  60. data/lib/ecoportal/api/graphql/model/contractor_entity.rb +12 -0
  61. data/lib/ecoportal/api/graphql/model/field.rb +10 -0
  62. data/lib/ecoportal/api/graphql/model/file_attachment.rb +10 -0
  63. data/lib/ecoportal/api/graphql/model/file_container.rb +11 -0
  64. data/lib/ecoportal/api/graphql/model/organization.rb +46 -0
  65. data/lib/ecoportal/api/graphql/model/page.rb +10 -0
  66. data/lib/ecoportal/api/graphql/model/person_member.rb +15 -0
  67. data/lib/ecoportal/api/graphql/model/resource.rb +12 -0
  68. data/lib/ecoportal/api/graphql/model/user.rb +12 -0
  69. data/lib/ecoportal/api/graphql/model.rb +20 -0
  70. data/lib/ecoportal/api/graphql/payload/create_contractor_entity.rb +11 -0
  71. data/lib/ecoportal/api/graphql/payload/destroy_contractor_entity.rb +10 -0
  72. data/lib/ecoportal/api/graphql/payload/update_contractor_entity.rb +10 -0
  73. data/lib/ecoportal/api/graphql/payload.rb +12 -0
  74. data/lib/ecoportal/api/graphql/query/actions.rb +94 -0
  75. data/lib/ecoportal/api/graphql/query/contractor_entities.rb +64 -0
  76. data/lib/ecoportal/api/graphql/query.rb +11 -0
  77. data/lib/ecoportal/api/graphql.rb +38 -0
  78. data/lib/ecoportal/api/graphql_version.rb +5 -0
  79. data/lib/ecoportal/api-graphql.rb +10 -0
  80. data/tests/actions_get.rb +8 -0
  81. data/tests/contractor_entities_get.rb +20 -0
  82. data/tests/local_libs.rb +14 -0
  83. metadata +278 -0
@@ -0,0 +1,33 @@
1
+ module Ecoportal
2
+ module API
3
+ class GraphQL
4
+ module Base
5
+ class Connection < Ecoportal::API::GraphQL::Base::Model
6
+ class GenericNode
7
+ def initialize(*args, **kargs)
8
+ raise "Missuse error. You should define a node_class for a class that inherits from GraphqlConnection class."
9
+ end
10
+ end
11
+
12
+ include Enumerable
13
+
14
+ class_resolver :node_class, GenericNode
15
+
16
+ passthrough :edges
17
+ passthrough :totalCount
18
+ embeds_many :nodes, klass: :node_class
19
+ embeds_one :pageInfo, klass: Ecoportal::API::GraphQL::Base::PageInfo
20
+
21
+ def empty?
22
+ count < 1
23
+ end
24
+
25
+ def each(&block)
26
+ return to_enum(:each) unless block
27
+ nodes.each(&block)
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,17 @@
1
+ module Ecoportal
2
+ module API
3
+ class GraphQL
4
+ module Base
5
+ class ContractorEntity < Ecoportal::API::GraphQL::Base::Model
6
+ passkey :id
7
+ passthrough :name
8
+ passboolean :active, :approved
9
+ passthrough :schemaId
10
+
11
+ passarray :associatedPeopleIds, :leadContractorIds
12
+ embeds_one :creator, klass: "Ecoportal::API::GraphQL::Model::User"
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,12 @@
1
+ module Ecoportal
2
+ module API
3
+ class GraphQL
4
+ module Base
5
+ class DateTime < Ecoportal::API::GraphQL::Base::Model
6
+ passdate :dateTime
7
+ passthrough :timeZone
8
+ end
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ module Ecoportal
2
+ module API
3
+ class GraphQL
4
+ module Base
5
+ class Field < Ecoportal::API::GraphQL::Base::Model
6
+ passkey :id
7
+ passthrough :label
8
+ end
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,15 @@
1
+ module Ecoportal
2
+ module API
3
+ class GraphQL
4
+ module Base
5
+ class FileAttachment < Ecoportal::API::GraphQL::Base::Model
6
+ passkey :id
7
+ passthrough :attachmentFileSize, :attachmentFileName, :attachmentContentType
8
+ passthrough :urlType, :activeName
9
+ passthrough :userId, :userName
10
+ embeds_one :attachmentUpdatedAt, klass: GraphQL::Base::DateTime
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,14 @@
1
+ module Ecoportal
2
+ module API
3
+ class GraphQL
4
+ module Base
5
+ class FileContainer < Ecoportal::API::GraphQL::Base::Model
6
+ passkey :id
7
+ passthrough :name, :activeName
8
+ passthrough :fileSize, :token, :activeVersionId
9
+ passarray :tags
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,11 @@
1
+ module Ecoportal
2
+ module API
3
+ class GraphQL
4
+ module Base
5
+ class IdDiffInput < Ecoportal::API::GraphQL::Base::Model
6
+ passarray :additions, :removals
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,33 @@
1
+ module Ecoportal
2
+ module API
3
+ class GraphQL
4
+ module Base
5
+ class Model < Ecoportal::API::Common::Content::DoubleModel
6
+ include Ecoportal::API::Common::GraphQL::ClassHelpers
7
+ #include GraphModel::HashKeys
8
+ class << self
9
+ attr_accessor :client
10
+
11
+ def as_input(hash, clientMutationId: "")
12
+ hash_input = hash.merge(clientMutationId: clientMutationId)
13
+ Ecoportal::API::Common::GraphQL::HashHelpers.remove_nil_keys_deep(hash_input, target: :id)
14
+ end
15
+ end
16
+
17
+ def as_update(ref = :last, ignore: [], sym_keys: false)
18
+ new_doc = as_json
19
+ ref_doc = ref == :total ? initial_doc : original_doc
20
+ Ecoportal::API::Common::HashDiff.diff(new_doc, ref_doc, ignore: ignore).yield_self do |out|
21
+ next out unless sym_keys
22
+ Ecoportal::API::Common::GraphQL::HashHelpers.keys_to_sym_deep(out)
23
+ end
24
+ end
25
+
26
+ def as_input(clientMutationId: "")
27
+ self.class.as_input(as_update(sym_keys: true), clientMutationId: clientMutationId)
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,13 @@
1
+ module Ecoportal
2
+ module API
3
+ class GraphQL
4
+ module Base
5
+ class Organization < Ecoportal::API::GraphQL::Base::Model
6
+ passkey :id
7
+ passthrough :name, :companyName
8
+ passthrough :logoUrl, read_only: true
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,12 @@
1
+ module Ecoportal
2
+ module API
3
+ class GraphQL
4
+ module Base
5
+ class Page < Ecoportal::API::GraphQL::Base::Model
6
+ passkey :id
7
+ passthrough :mouldCounter, :name
8
+ end
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ module Ecoportal
2
+ module API
3
+ class GraphQL
4
+ module Base
5
+ class PageInfo < Ecoportal::API::GraphQL::Base::Model
6
+ passthrough :startCursor, :endCursor
7
+ passboolean :hasNextPage, :hasPreviousPage
8
+ end
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,25 @@
1
+ module Ecoportal
2
+ module API
3
+ class GraphQL
4
+ module Base
5
+ class Payload < Ecoportal::API::GraphQL::Base::Model
6
+ class GenericItem
7
+ def initialize(*args, **kargs)
8
+ raise "Missuse error. You should define a item_class for a class that inherits from GraphqlPayload class."
9
+ end
10
+ end
11
+
12
+ passthrough :clientMutationId
13
+
14
+ class_resolver :item_class, GenericItem
15
+ embeds_one :item, klass: :item_class
16
+ embeds_one :errors, klass: Ecoportal::API::GraphQL::Base::ValidationErrors, nullable: true
17
+
18
+ def success?
19
+ !errors || errors.empty?
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,20 @@
1
+ module Ecoportal
2
+ module API
3
+ class GraphQL
4
+ module Base
5
+ class PersonMember < Ecoportal::API::GraphQL::Base::Model
6
+ passkey :id
7
+ passthrough :name, :email
8
+ passarray :tagRestrict, :userGroupIds
9
+
10
+ passthrough :personSchemaId
11
+
12
+ passthrough :contractorOrganizationId
13
+ passthrough :userId
14
+
15
+ passboolean :tracingAdmin
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,61 @@
1
+ module Ecoportal
2
+ module API
3
+ class GraphQL
4
+ module Base
5
+ class Query
6
+ class GenericItem
7
+ def initialize(*args, **kargs)
8
+ raise "Missuse error. You should define a item_class for a class that inherits from Query class."
9
+ end
10
+ end
11
+
12
+ include Ecoportal::API::Common::GraphQL::ClassHelpers
13
+
14
+ inheritable_attrs :accepted_params
15
+
16
+ class << self
17
+ def accepted_params(*keys)
18
+ @accepted_params ||= []
19
+ return @accepted_params if keys.empty?
20
+ @accepted_params.push(*keys).tap {|ks| ks.uniq!}
21
+ end
22
+
23
+ def clear_accepted_params
24
+ @accepted_params = []
25
+ end
26
+
27
+ def slice_params(kargs)
28
+ kargs.slice(*accepted_params)
29
+ end
30
+ end
31
+
32
+ class_resolver :item_class, GenericItem
33
+ attr_reader :client
34
+
35
+ def initialize(client)
36
+ @client = client
37
+ end
38
+
39
+ def response_class
40
+ item_class
41
+ end
42
+
43
+ def access_point(path = [])
44
+ path.last
45
+ end
46
+
47
+ def request(*path)
48
+ response = yield
49
+ wrap_response(response, path)
50
+ end
51
+
52
+ def wrap_response(response, path = [])
53
+ raise "Complete failure on request. Path: #{path}" unless res = response.to_h.dig("data", *path)
54
+ data = Ecoportal::API::Common::GraphQL::HashHelpers.deep_dup(res)
55
+ response_class.new(data)
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,56 @@
1
+ module Ecoportal
2
+ module API
3
+ class GraphQL
4
+ module Base
5
+ class QueryConnection < Ecoportal::API::GraphQL::Base::Query
6
+ accepted_params :searchConf, :after, :before, :first, :last
7
+ include Enumerable
8
+
9
+ attr_reader :path
10
+
11
+ def initialize(*args, path: default_base_path, **kargs)
12
+ @path = path
13
+ super(*args, **kargs)
14
+ end
15
+
16
+ def query(path: default_base_path, **kargs, &block)
17
+ path ||= default_base_path
18
+ kargs = self.class.slice_params(kargs)
19
+ ap = access_point(path)
20
+ raise "Missuse. You have to implement this method in the child class"
21
+ end
22
+
23
+ def each(**kargs, &block)
24
+ return to_enum(:each, **kargs) unless block
25
+ cursor = nil; results = 0
26
+ loop do
27
+ kargs.update(after: cursor) if cursor
28
+ connection = query(**kargs)
29
+ #total = connection.totalCount
30
+ pageInfo = connection.pageInfo
31
+ connection.nodes.each do |item|
32
+ yield item
33
+ end
34
+ break unless cursor = pageInfo.endCursor
35
+ end
36
+ end
37
+
38
+ def response_class
39
+ return connection_class if respond_to?(:connection_class)
40
+ @response_class ||= self.class.new_class(
41
+ item_class,
42
+ inherits: Ecoportal::API::GraphQL::Base::Connection,
43
+ namespace: "Ecoportal::API::GraphQL::Connection"
44
+ ) do |klass|
45
+ klass.item_class = item_class
46
+ end
47
+ end
48
+
49
+ def default_base_path
50
+ ["currentOrganization"]
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,13 @@
1
+ module Ecoportal
2
+ module API
3
+ class GraphQL
4
+ module Base
5
+ class Resource < Ecoportal::API::GraphQL::Base::Model
6
+ passkey :id
7
+ passthrough :fieldId, :pageId
8
+ passarray :stageIds
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,23 @@
1
+ module Ecoportal
2
+ module API
3
+ class GraphQL
4
+ module Base
5
+ class ValidationErrors < Ecoportal::API::GraphQL::Base::Model
6
+ include Enumerable
7
+
8
+ passthrough :details
9
+ passarray :fullMessages
10
+
11
+ def empty?
12
+ count < 1
13
+ end
14
+
15
+ def each(&block)
16
+ return to_enum(:each) unless block
17
+ fullMessages.each(&block)
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,28 @@
1
+ module Ecoportal
2
+ module API
3
+ class GraphQL
4
+ module Base
5
+ end
6
+ end
7
+ end
8
+ end
9
+
10
+ require 'ecoportal/api/graphql/base/model'
11
+ require 'ecoportal/api/graphql/base/date_time'
12
+ require 'ecoportal/api/graphql/base/id_diff_input'
13
+ require 'ecoportal/api/graphql/base/page_info'
14
+ require 'ecoportal/api/graphql/base/query'
15
+ require 'ecoportal/api/graphql/base/connection'
16
+ require 'ecoportal/api/graphql/base/query_connection'
17
+ require 'ecoportal/api/graphql/base/validation_errors'
18
+ require 'ecoportal/api/graphql/base/payload'
19
+ require 'ecoportal/api/graphql/base/person_member'
20
+ require 'ecoportal/api/graphql/base/file_attachment'
21
+ require 'ecoportal/api/graphql/base/file_container'
22
+ require 'ecoportal/api/graphql/base/field'
23
+ require 'ecoportal/api/graphql/base/page'
24
+ require 'ecoportal/api/graphql/base/resource'
25
+ require 'ecoportal/api/graphql/base/action_category'
26
+ require 'ecoportal/api/graphql/base/action'
27
+ require 'ecoportal/api/graphql/base/contractor_entity'
28
+ require 'ecoportal/api/graphql/base/organization'
@@ -0,0 +1,11 @@
1
+ module Ecoportal
2
+ module API
3
+ class GraphQL
4
+ module Connection
5
+ class Action < Ecoportal::API::GraphQL::Base::Connection
6
+ class_resolver :node_class, Ecoportal::API::GraphQL::Model::Action
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ module Ecoportal
2
+ module API
3
+ class GraphQL
4
+ module Connection
5
+ class ContractorEntity < Ecoportal::API::GraphQL::Base::Connection
6
+ class_resolver :node_class, Ecoportal::API::GraphQL::Model::ContractorEntity
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ module Ecoportal
2
+ module API
3
+ class GraphQL
4
+ module Connection
5
+ class PersonMemberConnection < Ecoportal::API::GraphQL::Base::Connection
6
+ class_resolver :node_class, Ecoportal::API::GraphQL::Model::PersonMember
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,12 @@
1
+ module Ecoportal
2
+ module API
3
+ class GraphQL
4
+ module Connection
5
+ end
6
+ end
7
+ end
8
+ end
9
+
10
+ require 'ecoportal/api/graphql/connection/person_member'
11
+ require 'ecoportal/api/graphql/connection/contractor_entity'
12
+ require 'ecoportal/api/graphql/connection/action'
@@ -0,0 +1,19 @@
1
+ module Ecoportal
2
+ module API
3
+ class GraphQL
4
+ class Fragment
5
+ fragment :ContractorEntity, <<~'GRAPHQL'
6
+ fragment on ContractorEntity {
7
+ id
8
+ name
9
+ schemaId
10
+ active
11
+ approved
12
+ associatedPeopleIds
13
+ leadContractorIds
14
+ }
15
+ GRAPHQL
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,17 @@
1
+ module Ecoportal
2
+ module API
3
+ class GraphQL
4
+ class Fragment
5
+ fragment :Pagination, <<~'GRAPHQL'
6
+ fragment on ContractorEntityConnection {
7
+ totalCount
8
+ pageInfo {
9
+ endCursor
10
+ hasNextPage
11
+ }
12
+ }
13
+ GRAPHQL
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,50 @@
1
+ module Ecoportal
2
+ module API
3
+ class GraphQL
4
+ class Fragment
5
+ class << self
6
+ def const?(value)
7
+ begin
8
+ const_get(value)
9
+ rescue NameError => e
10
+ return false
11
+ end
12
+ true
13
+ end
14
+
15
+ def fragment(sym, heredoc)
16
+ fragments[sym] = heredoc
17
+ end
18
+
19
+ def fragments
20
+ @fragments ||= {}
21
+ end
22
+ end
23
+
24
+ attr_reader :client, :fragments
25
+
26
+ def initialize(client)
27
+ @client = client
28
+ parse
29
+ end
30
+
31
+ private
32
+
33
+ def parse
34
+ fragments = self.class.fragments.each_with_object({}) do |(sym, heredoc), out|
35
+ if self.class.const?(sym)
36
+ fragment = self.class.get_const(sym)
37
+ else
38
+ fragment = client.parse(heredoc)
39
+ self.class.const_set(sym, fragment)
40
+ end
41
+ out[sym] = fragment
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+
49
+ require 'ecoportal/api/graphql/fragment/contractor_entity'
50
+ require 'ecoportal/api/graphql/fragment/pagination'
@@ -0,0 +1,14 @@
1
+ module Ecoportal
2
+ module API
3
+ class GraphQL
4
+ module Input
5
+ class CreateContractorEntity < Ecoportal::API::GraphQL::Base::ContractorEntity
6
+ passthrough :clientMutationId
7
+ class_resolver :id_diff_input, "Ecoportal::API::GraphQL::Base::IdDiffInput"
8
+ embeds_one :associatedPeopleIds, klass: :id_diff_input
9
+ embeds_one :leadContractorIds, klass: :id_diff_input
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,11 @@
1
+ module Ecoportal
2
+ module API
3
+ class GraphQL
4
+ module Input
5
+ class DestroyContractorEntity < Ecoportal::API::GraphQL::Base::Model
6
+ passkey :id
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,13 @@
1
+ module Ecoportal
2
+ module API
3
+ class GraphQL
4
+ module Input
5
+ class Search < Ecoportal::API::GraphQL::Base::Model
6
+ embeds_many :filters, enum_class: "Ecoportal::API::GraphQL::Input::SearchFilter"
7
+ passthrough :query
8
+ embeds_many :sorters, enum_class: "Ecoportal::API::GraphQL::Input::SearchSorter"
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,12 @@
1
+ module Ecoportal
2
+ module API
3
+ class GraphQL
4
+ module Input
5
+ class SearchFilter < Ecoportal::API::GraphQL::Base::Model
6
+ passthrough :id, :fieldName, :key, :operation
7
+ passthrough :params, :path
8
+ end
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,11 @@
1
+ module Ecoportal
2
+ module API
3
+ class GraphQL
4
+ module Input
5
+ class SearchSorter < Ecoportal::API::GraphQL::Base::Model
6
+ passthrough :direction, :key, :missing
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,10 @@
1
+ module Ecoportal
2
+ module API
3
+ class GraphQL
4
+ module Input
5
+ class UpdateContractorEntity < Ecoportal::API::GraphQL::Input::CreateContractorEntity
6
+ end
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,15 @@
1
+ module Ecoportal
2
+ module API
3
+ class GraphQL
4
+ module Input
5
+ end
6
+ end
7
+ end
8
+ end
9
+
10
+ require 'ecoportal/api/graphql/input/search_filter'
11
+ require 'ecoportal/api/graphql/input/search_sorter'
12
+ require 'ecoportal/api/graphql/input/search'
13
+ require 'ecoportal/api/graphql/input/create_contractor_entity'
14
+ require 'ecoportal/api/graphql/input/update_contractor_entity'
15
+ require 'ecoportal/api/graphql/input/destroy_contractor_entity'