ecoportal-api-graphql 0.3.13 → 0.3.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +43 -10
- data/CHANGELOG.md +7 -0
- data/README.md +4 -0
- data/Rakefile +14 -3
- data/ecoportal-api-graphql.gemspec +2 -2
- data/lib/ecoportal/api/graphql/base/location_structure.rb +1 -0
- data/lib/ecoportal/api/graphql/fragment/action.rb +1 -1
- data/lib/ecoportal/api/graphql/fragment/contractor_entity.rb +1 -1
- data/lib/ecoportal/api/graphql/fragment/location_node.rb +1 -1
- data/lib/ecoportal/api/graphql/fragment/pagination.rb +1 -1
- data/lib/ecoportal/api/graphql/helpers/locations_tree.rb +10 -10
- data/lib/ecoportal/api/graphql/logic/base_query.rb +12 -5
- data/lib/ecoportal/api/graphql/logic/connection.rb +1 -1
- data/lib/ecoportal/api/graphql/logic/mutation.rb +8 -7
- data/lib/ecoportal/api/graphql/logic/payload.rb +1 -1
- data/lib/ecoportal/api/graphql/logic/query.rb +1 -1
- data/lib/ecoportal/api/graphql/logic/query_array.rb +1 -1
- data/lib/ecoportal/api/graphql/logic/query_connection.rb +5 -7
- data/lib/ecoportal/api/graphql/model/location_node.rb +9 -0
- data/lib/ecoportal/api/graphql/mutation/location_structure/apply_commands.rb +24 -24
- data/lib/ecoportal/api/graphql/query/location_structure.rb +2 -2
- data/lib/ecoportal/api/graphql/query/location_structures.rb +3 -3
- data/lib/ecoportal/api/graphql_version.rb +1 -1
- metadata +5 -6
- data/.travis.yml +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da17c7fff2d84fe5564911fe5a9be5af6200fdd085e681e4547ce900f44315bd
|
4
|
+
data.tar.gz: 622ced495fa4873f4ca3ea72596865c2db9bb78172f80253e0f90e5167b2e89a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 796f9be5a3c4edd8f400675e45c3138370fe98106d8045f30084b9e39b98264ff939b4152ee05908d987518a04d9989d2131b62655dfac2e2fab45940da560e6
|
7
|
+
data.tar.gz: 444a2be4a632b01ac2c949279fd42ad1a5420f0a14d32f72746ebcd726521ea09da8b6bd16ac30409cef2c8550d368187f6be554b67850426a369a4f57db7ab3
|
data/.rubocop.yml
CHANGED
@@ -1,12 +1,11 @@
|
|
1
1
|
AllCops:
|
2
|
-
TargetRubyVersion: 2.
|
2
|
+
TargetRubyVersion: 2.7.8
|
3
3
|
Exclude:
|
4
4
|
- 'config/routes.rb'
|
5
|
+
NewCops: enable
|
5
6
|
|
6
|
-
Metrics/LineLength:
|
7
|
-
Enabled: false
|
8
7
|
Metrics/BlockLength:
|
9
|
-
|
8
|
+
CountAsOne: ['array', 'heredoc', 'method_call']
|
10
9
|
Max: 50
|
11
10
|
Metrics/MethodLength:
|
12
11
|
Max: 50
|
@@ -14,26 +13,51 @@ Metrics/ClassLength:
|
|
14
13
|
Max: 200
|
15
14
|
Metrics/AbcSize:
|
16
15
|
Max: 30
|
17
|
-
|
18
|
-
ParameterLists:
|
16
|
+
Metrics/ParameterLists:
|
19
17
|
Max: 5
|
20
18
|
CountKeywordArgs: false
|
19
|
+
Metrics/CyclomaticComplexity:
|
20
|
+
Max: 30
|
21
|
+
Metrics/PerceivedComplexity:
|
22
|
+
Max: 30
|
21
23
|
|
22
|
-
|
24
|
+
Layout/HashAlignment:
|
25
|
+
EnforcedColonStyle: table
|
26
|
+
EnforcedHashRocketStyle: table
|
27
|
+
|
28
|
+
Style/BlockDelimiters:
|
29
|
+
BracesRequiredMethods: ['log']
|
30
|
+
AllowedMethods: ['proc', 'new']
|
31
|
+
Enabled: false
|
32
|
+
Style/ClassAndModuleChildren:
|
23
33
|
Enabled: false
|
24
34
|
Style/FrozenStringLiteralComment:
|
25
35
|
Enabled: false
|
36
|
+
Style/StringLiterals:
|
37
|
+
Enabled: false
|
38
|
+
Style/Documentation:
|
39
|
+
Enabled: false
|
26
40
|
Style/CommentedKeyword:
|
27
41
|
Enabled: false
|
28
|
-
|
42
|
+
Layout/LeadingCommentSpace:
|
29
43
|
Enabled: false
|
30
|
-
|
44
|
+
AllowGemfileRubyComment: true
|
45
|
+
Style/MultilineBlockChain:
|
31
46
|
Enabled: false
|
32
47
|
Style/StringLiteralsInInterpolation:
|
33
48
|
Enabled: false
|
34
49
|
Style/AndOr:
|
35
50
|
Enabled: false
|
51
|
+
Style/Alias:
|
52
|
+
EnforcedStyle: prefer_alias_method
|
53
|
+
Style/FetchEnvVar:
|
54
|
+
Enabled: false
|
55
|
+
Style/RegexpLiteral:
|
56
|
+
EnforcedStyle: mixed
|
57
|
+
AllowInnerSlashes: true
|
36
58
|
|
59
|
+
Layout/LineLength:
|
60
|
+
Enabled: false
|
37
61
|
Layout/SpaceInsideHashLiteralBraces:
|
38
62
|
Enabled: false
|
39
63
|
Layout/SpaceInsideBlockBraces:
|
@@ -48,8 +72,17 @@ Layout/DotPosition:
|
|
48
72
|
EnforcedStyle: trailing
|
49
73
|
Layout/MultilineMethodCallIndentation:
|
50
74
|
EnforcedStyle: indented
|
51
|
-
Layout/
|
75
|
+
Layout/FirstHashElementIndentation:
|
76
|
+
Enabled: false
|
77
|
+
Layout/EmptyLineAfterGuardClause:
|
52
78
|
Enabled: false
|
53
79
|
|
54
80
|
Naming/VariableNumber:
|
55
81
|
EnforcedStyle: snake_case
|
82
|
+
CheckSymbols: false
|
83
|
+
Naming/MethodParameterName:
|
84
|
+
AllowedNames: ['x', 'y', 'i', 'j']
|
85
|
+
Naming/RescuedExceptionsVariableName:
|
86
|
+
Enabled: false
|
87
|
+
Naming/MethodName:
|
88
|
+
Enabled: false
|
data/CHANGELOG.md
CHANGED
@@ -12,8 +12,15 @@ All notable changes to this project will be documented in this file.
|
|
12
12
|
## [0.3.14] - 2024-02-xx
|
13
13
|
|
14
14
|
### Added
|
15
|
+
- some benchmarking on
|
16
|
+
1. core graphql base `query`
|
17
|
+
- `#parent_id` to location node model
|
18
|
+
|
15
19
|
### Changed
|
20
|
+
- upgraded `ecoportal-v2-api` gem
|
21
|
+
|
16
22
|
### Fixed
|
23
|
+
- Optimized `treeify` and locations structure class
|
17
24
|
|
18
25
|
## [0.3.13] - 2024-02-03
|
19
26
|
|
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
2
|
require "rspec/core/rake_task"
|
3
|
+
require 'rubocop/rake_task'
|
3
4
|
require "yard"
|
4
5
|
require "redcarpet"
|
5
6
|
|
@@ -10,11 +11,18 @@ desc "run rspec showing backtrace"
|
|
10
11
|
RSpec::Core::RakeTask.new(:spec_trace) do |task|
|
11
12
|
task.rspec_opts = ['--backtrace']
|
12
13
|
end
|
14
|
+
task :rspec_trace => :spec_trace
|
13
15
|
|
14
16
|
desc "run rspec stopping on first fail, and show backtrace"
|
15
17
|
RSpec::Core::RakeTask.new(:spec_fast) do |task|
|
16
18
|
task.rspec_opts = ['--fail-fast', '--backtrace']
|
17
19
|
end
|
20
|
+
task :rspec_fast => :spec_fast
|
21
|
+
|
22
|
+
desc "run rubocop diaplying cop names"
|
23
|
+
RuboCop::RakeTask.new(:rubocop) do |t|
|
24
|
+
t.options = ['--display-cop-names']
|
25
|
+
end
|
18
26
|
|
19
27
|
# default task name is yard
|
20
28
|
desc "Yard: generate all the documentation"
|
@@ -22,6 +30,9 @@ YARD::Rake::YardocTask.new(:doc) do |t|
|
|
22
30
|
#t.files = ['lib/**/*.rb']
|
23
31
|
end
|
24
32
|
|
25
|
-
|
26
|
-
task :
|
27
|
-
|
33
|
+
desc "default task: runs rubocop and rspec"
|
34
|
+
task :default do
|
35
|
+
Rake::Task[:rubocop].invoke
|
36
|
+
ensure
|
37
|
+
Rake::Task[:spec].invoke
|
38
|
+
end
|
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.homepage = "https://www.ecoportal.com"
|
14
14
|
spec.licenses = %w[MIT]
|
15
15
|
|
16
|
-
spec.required_ruby_version = '>= 2.
|
16
|
+
spec.required_ruby_version = '>= 2.7.0'
|
17
17
|
|
18
18
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
19
19
|
f.match(%r{^(test|spec|features)/})
|
@@ -29,6 +29,6 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.add_development_dependency "redcarpet", ">= 3.6.0", "< 4"
|
30
30
|
spec.add_development_dependency "pry" , ">= 0.14"
|
31
31
|
|
32
|
-
spec.add_dependency 'ecoportal-api-v2', '>= 1.1.
|
32
|
+
spec.add_dependency 'ecoportal-api-v2', '>= 1.1.7', '< 1.2'
|
33
33
|
spec.add_dependency 'graphlient', '>= 0.8.0', '< 0.9'
|
34
34
|
end
|
@@ -3,11 +3,11 @@ module Ecoportal
|
|
3
3
|
class GraphQL
|
4
4
|
module Helpers
|
5
5
|
module LocationsTree
|
6
|
+
RELEVANT_NODES_COUNT = 1000
|
7
|
+
|
6
8
|
def treeify(nodes)
|
7
|
-
parents = nodes.each_with_object({}) do |node,
|
8
|
-
|
9
|
-
parentId = parent && parent.id.upcase
|
10
|
-
(parents[parentId] ||= []).push(node)
|
9
|
+
parents = nodes.each_with_object({}) do |node, out|
|
10
|
+
(out[node.parent_id_upcase] ||= []).push(node)
|
11
11
|
end
|
12
12
|
get_children(nil, parents)
|
13
13
|
end
|
@@ -21,15 +21,15 @@ module Ecoportal
|
|
21
21
|
class_names = class_types.map(&:name)
|
22
22
|
|
23
23
|
results << {
|
24
|
-
"id"
|
25
|
-
"name"
|
26
|
-
"weight"
|
27
|
-
"parent_id"
|
28
|
-
"archived"
|
24
|
+
"id" => child.id,
|
25
|
+
"name" => child.name,
|
26
|
+
"weight" => child.weight,
|
27
|
+
"parent_id" => node_id,
|
28
|
+
"archived" => child.archived,
|
29
29
|
"archived_token" => child.archivedToken,
|
30
30
|
"classifications" => class_ids,
|
31
31
|
"classification_names" => class_names,
|
32
|
-
"nodes"
|
32
|
+
"nodes" => get_children(child.id, parents).compact
|
33
33
|
}
|
34
34
|
end
|
35
35
|
end
|
@@ -19,7 +19,7 @@ module Ecoportal
|
|
19
19
|
param_defaults[key] = default unless default == :unused
|
20
20
|
end
|
21
21
|
|
22
|
-
@accepted_params.push(*keys).tap
|
22
|
+
@accepted_params.push(*keys).tap(&:uniq!)
|
23
23
|
@accepted_params
|
24
24
|
end
|
25
25
|
|
@@ -41,6 +41,8 @@ module Ecoportal
|
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
44
|
+
include Ecoportal::API::Common::Concerns::Benchmarkable
|
45
|
+
|
44
46
|
attr_reader :client
|
45
47
|
attr_reader :base_path
|
46
48
|
|
@@ -53,7 +55,7 @@ module Ecoportal
|
|
53
55
|
# Resolves the `path` by using `path` or `base_path` + `class.field_name`.
|
54
56
|
def path(field_name = self.class.field_name)
|
55
57
|
result = @path
|
56
|
-
result ||= default_path if
|
58
|
+
result ||= default_path if respond_to?(:default_path, true)
|
57
59
|
result ||= (base_path + [field_name]) if base_path && field_name
|
58
60
|
result
|
59
61
|
end
|
@@ -61,7 +63,9 @@ module Ecoportal
|
|
61
63
|
# Query rely that manages the different blocks.
|
62
64
|
# @return [Class] an object of `response_class` with the results hanging from `path`.
|
63
65
|
def query(path: self.path, **kargs, &block)
|
64
|
-
|
66
|
+
benchmarking("#{self.class}##{__method__}", print: true) do
|
67
|
+
graphql_query(path: path, **kargs, &basic_block(&block))
|
68
|
+
end
|
65
69
|
end
|
66
70
|
|
67
71
|
def response_class
|
@@ -84,7 +88,7 @@ module Ecoportal
|
|
84
88
|
request(*path) do
|
85
89
|
raw_response[:data] = client.query(query_params, &block)
|
86
90
|
end
|
87
|
-
rescue Faraday::ParsingError, Graphlient::Errors::GraphQLError =>
|
91
|
+
rescue Faraday::ParsingError, Graphlient::Errors::GraphQLError => _err
|
88
92
|
puts "Internal Error with these params:"
|
89
93
|
pp kargs
|
90
94
|
pp block
|
@@ -97,7 +101,10 @@ module Ecoportal
|
|
97
101
|
end
|
98
102
|
|
99
103
|
def wrap_response(response, path = [])
|
100
|
-
|
104
|
+
unless (res = response.to_h.dig(*path.dup.unshift("data")))
|
105
|
+
msg = "Complete failure on request. Path: #{path}\n#{response.to_h.pretty_inspect}"
|
106
|
+
raise msg
|
107
|
+
end
|
101
108
|
data = Ecoportal::API::Common::GraphQL::HashHelpers.deep_dup(res)
|
102
109
|
response_class.new(data)
|
103
110
|
end
|
@@ -4,7 +4,7 @@ module Ecoportal
|
|
4
4
|
module Logic
|
5
5
|
class Connection < Ecoportal::API::GraphQL::Base::Model
|
6
6
|
class GenericNode
|
7
|
-
def initialize(*
|
7
|
+
def initialize(*_args, **_kargs)
|
8
8
|
raise "Missuse error. You should define a node_class for a class that inherits from GraphqlConnection class."
|
9
9
|
end
|
10
10
|
end
|
@@ -4,12 +4,13 @@ module Ecoportal
|
|
4
4
|
module Logic
|
5
5
|
class Mutation < Ecoportal::API::GraphQL::Logic::BaseQuery
|
6
6
|
class GenericPayload
|
7
|
-
def initialize(*
|
7
|
+
def initialize(*_args, **_kargs)
|
8
8
|
raise "Missuse error. You should define a payload_class for a class that inherits from Mutation class."
|
9
9
|
end
|
10
10
|
end
|
11
|
+
|
11
12
|
class GenericInput
|
12
|
-
def initialize(*
|
13
|
+
def initialize(*_args, **_kargs)
|
13
14
|
raise "Missuse error. You should define a input_class for a class that inherits from Mutation class."
|
14
15
|
end
|
15
16
|
end
|
@@ -23,7 +24,7 @@ module Ecoportal
|
|
23
24
|
request(*path) do
|
24
25
|
client.query(input: as_input(input), &basic_block(&block))
|
25
26
|
end
|
26
|
-
rescue Faraday::ParsingError, Graphlient::Errors::FaradayServerError =>
|
27
|
+
rescue Faraday::ParsingError, Graphlient::Errors::FaradayServerError => _err
|
27
28
|
puts "Internal Error with these input ('#{input.class}'):"
|
28
29
|
pp input
|
29
30
|
raise
|
@@ -43,13 +44,13 @@ module Ecoportal
|
|
43
44
|
value
|
44
45
|
when Ecoportal::API::GraphQL::Base::Model
|
45
46
|
value.as_input
|
46
|
-
when Hash
|
47
|
-
|
48
|
-
|
47
|
+
# when Hash
|
48
|
+
# value = Helpers::Model::HashKeys.keys_to_sym_deep(value)
|
49
|
+
# Ecoportal::API::Base::Model.as_input(value)
|
49
50
|
when Enumerable
|
50
51
|
value.map {|v| as_input(v)}
|
51
52
|
else
|
52
|
-
raise ArgumentError
|
53
|
+
raise ArgumentError, "Expecting Hash, GraphQL::Base::Model or Enumerable. Unsupported type '#{value.class}'."
|
53
54
|
end
|
54
55
|
end
|
55
56
|
end
|
@@ -4,7 +4,7 @@ module Ecoportal
|
|
4
4
|
module Logic
|
5
5
|
class Payload < Ecoportal::API::GraphQL::Base::Model
|
6
6
|
class GenericItem
|
7
|
-
def initialize(*
|
7
|
+
def initialize(*_args, **_kargs)
|
8
8
|
raise "Missuse error. You should define a item_class for a class that inherits from GraphqlPayload class."
|
9
9
|
end
|
10
10
|
end
|
@@ -4,7 +4,7 @@ module Ecoportal
|
|
4
4
|
module Logic
|
5
5
|
class Query < Ecoportal::API::GraphQL::Logic::BaseQuery
|
6
6
|
class GenericItem
|
7
|
-
def initialize(*
|
7
|
+
def initialize(*_args, **_kargs)
|
8
8
|
raise "Missuse error. You should define a item_class for a class that inherits from Query class."
|
9
9
|
end
|
10
10
|
end
|
@@ -6,7 +6,7 @@ module Ecoportal
|
|
6
6
|
include Enumerable
|
7
7
|
|
8
8
|
def each(item_block: nil, **kargs, &block)
|
9
|
-
return to_enum(:each,
|
9
|
+
return to_enum(:each, item_block: connection_block, **kargs) unless block
|
10
10
|
query(**kargs, &item_block).each do |item|
|
11
11
|
yield(item) if block_given?
|
12
12
|
end
|
@@ -8,16 +8,14 @@ module Ecoportal
|
|
8
8
|
|
9
9
|
def each(connection_block: nil, **kargs, &block)
|
10
10
|
return to_enum(:each, **kargs, connection_block: connection_block) unless block
|
11
|
-
cursor = nil
|
11
|
+
cursor = nil
|
12
12
|
loop do
|
13
13
|
kargs.update(after: cursor) if cursor
|
14
14
|
connection = query(**kargs, &connection_block)
|
15
15
|
#total = connection.totalCount
|
16
|
-
|
17
|
-
connection.nodes.each
|
18
|
-
|
19
|
-
end
|
20
|
-
break unless cursor = pageInfo.endCursor
|
16
|
+
page_info = connection.pageInfo
|
17
|
+
connection.nodes.each(&block)
|
18
|
+
break unless (cursor = page_info.endCursor)
|
21
19
|
end
|
22
20
|
end
|
23
21
|
|
@@ -25,7 +23,7 @@ module Ecoportal
|
|
25
23
|
return connection_class if respond_to?(:connection_class)
|
26
24
|
@response_class ||= self.class.new_class(
|
27
25
|
item_class,
|
28
|
-
inherits:
|
26
|
+
inherits: Ecoportal::API::GraphQL::Logic::Connection,
|
29
27
|
namespace: "Ecoportal::API::GraphQL::Connection"
|
30
28
|
) do |klass|
|
31
29
|
klass.item_class = item_class
|
@@ -5,6 +5,15 @@ module Ecoportal
|
|
5
5
|
class LocationNode < Ecoportal::API::GraphQL::Base::LocationNode
|
6
6
|
embeds_one :parent, klass: Model::LocationNode, nullable: true
|
7
7
|
embeds_many :ancestors, klass: Model::LocationNode
|
8
|
+
|
9
|
+
def parentId
|
10
|
+
parent&.id
|
11
|
+
end
|
12
|
+
alias_method :parent_id, :parentId
|
13
|
+
|
14
|
+
def parent_id_upcase
|
15
|
+
parent_id&.upcase
|
16
|
+
end
|
8
17
|
end
|
9
18
|
end
|
10
19
|
end
|
@@ -12,7 +12,7 @@ module Ecoportal
|
|
12
12
|
|
13
13
|
def basic_block(&block)
|
14
14
|
payload_block = block || default_payload_block
|
15
|
-
|
15
|
+
proc {
|
16
16
|
mutation(input: :ApplyCommandsToLocationStructureInput!) {
|
17
17
|
applyCommandsToLocationStructure(input: :input, &payload_block)
|
18
18
|
}
|
@@ -20,32 +20,32 @@ module Ecoportal
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def default_payload_block
|
23
|
-
|
23
|
+
proc {
|
24
24
|
clientMutationId
|
25
25
|
error {
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
26
|
+
message
|
27
|
+
conflictingIds
|
28
|
+
validationErrors {
|
29
|
+
error
|
30
|
+
message
|
31
|
+
}
|
32
|
+
}
|
33
|
+
results {
|
34
|
+
command {
|
35
|
+
id
|
36
|
+
state
|
37
37
|
__typename
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
38
|
+
}
|
39
|
+
ok
|
40
|
+
error {
|
41
|
+
conflictingIds
|
42
|
+
message
|
43
|
+
validationErrors {
|
44
|
+
error
|
45
|
+
message
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
49
49
|
structure {
|
50
50
|
nodes(includeArchived: true) {
|
51
51
|
___Ecoportal__API__GraphQL__Fragment__LocationNode
|
@@ -14,7 +14,7 @@ module Ecoportal
|
|
14
14
|
|
15
15
|
def basic_block(&block)
|
16
16
|
final_block = block || default_query_block
|
17
|
-
|
17
|
+
proc {
|
18
18
|
query(id: :id!, includeArchivedNodes: :boolean) {
|
19
19
|
currentOrganization {
|
20
20
|
locations {
|
@@ -29,7 +29,7 @@ module Ecoportal
|
|
29
29
|
# @note this is on purpose, as via API
|
30
30
|
# there isn't much sense in not including archived nodes.
|
31
31
|
def default_query_block
|
32
|
-
|
32
|
+
proc {
|
33
33
|
id
|
34
34
|
name
|
35
35
|
archived
|
@@ -5,7 +5,7 @@ module Ecoportal
|
|
5
5
|
class LocationStructures < Ecoportal::API::GraphQL::Logic::QueryArray
|
6
6
|
accepted_params :includeArchived, :includeUnpublished, default: false
|
7
7
|
accepted_params :includeArchivedNodes, default: true
|
8
|
-
|
8
|
+
|
9
9
|
field_name :structures
|
10
10
|
|
11
11
|
class_resolver :item_class, Ecoportal::API::GraphQL::Model::LocationStructure
|
@@ -14,7 +14,7 @@ module Ecoportal
|
|
14
14
|
|
15
15
|
def basic_block(&block)
|
16
16
|
final_block = block || default_query_block
|
17
|
-
|
17
|
+
proc {
|
18
18
|
query(includeArchived: :boolean,
|
19
19
|
includeUnpublished: :boolean,
|
20
20
|
includeArchivedNodes: :boolean
|
@@ -36,7 +36,7 @@ module Ecoportal
|
|
36
36
|
# @note this is on purpose, as via API
|
37
37
|
# there isn't much sense in not including archived nodes.
|
38
38
|
def default_query_block
|
39
|
-
|
39
|
+
proc {
|
40
40
|
id
|
41
41
|
name
|
42
42
|
archived
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecoportal-api-graphql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oscar Segura
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -130,7 +130,7 @@ dependencies:
|
|
130
130
|
requirements:
|
131
131
|
- - ">="
|
132
132
|
- !ruby/object:Gem::Version
|
133
|
-
version: 1.1.
|
133
|
+
version: 1.1.7
|
134
134
|
- - "<"
|
135
135
|
- !ruby/object:Gem::Version
|
136
136
|
version: '1.2'
|
@@ -140,7 +140,7 @@ dependencies:
|
|
140
140
|
requirements:
|
141
141
|
- - ">="
|
142
142
|
- !ruby/object:Gem::Version
|
143
|
-
version: 1.1.
|
143
|
+
version: 1.1.7
|
144
144
|
- - "<"
|
145
145
|
- !ruby/object:Gem::Version
|
146
146
|
version: '1.2'
|
@@ -174,7 +174,6 @@ files:
|
|
174
174
|
- ".gitignore"
|
175
175
|
- ".rspec"
|
176
176
|
- ".rubocop.yml"
|
177
|
-
- ".travis.yml"
|
178
177
|
- ".yardopts"
|
179
178
|
- CHANGELOG.md
|
180
179
|
- Gemfile
|
@@ -325,7 +324,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
325
324
|
requirements:
|
326
325
|
- - ">="
|
327
326
|
- !ruby/object:Gem::Version
|
328
|
-
version: 2.
|
327
|
+
version: 2.7.0
|
329
328
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
330
329
|
requirements:
|
331
330
|
- - ">="
|