ecoportal-api-graphql 1.3.2 → 1.3.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3423fe59a4d52c23bc291894e4afa864eefa963033a5236f286fc214faf2309a
4
- data.tar.gz: d6a5362bf375f50772bbc98c06fe37d3242a7d10596d8e067817a5ffeedb5933
3
+ metadata.gz: e148fcd6c75c8724f75b4797859146f245d9809a7e0c14330e70b0f0eeaecbbe
4
+ data.tar.gz: 819b4b7a1c61ad24a186688d45dc1a094dc7e09ea5b13b520837fa8fd0913b2e
5
5
  SHA512:
6
- metadata.gz: d31e6419bc84e0a3cd5b2c89c0a3d51c791ac3ee8a498cb11b7adecd7681c2b8dcbc502cbe48ae51a221b5d9bc822d7e41cc9778baa4498a42f244374322fa3a
7
- data.tar.gz: 59ec3bd222d85393e6238de88fe801acc323ed0fdc89f250b609da702602b3b5c00856c4d844013d85d23248e60190cfd67fcfa1a845a3eba4da64cc507b5ab2
6
+ metadata.gz: d51e9a2180bab176ec59881c3a4f0096254c668d81cf7e728ae3cba97b6c6eab0804a94947894f1eb0f5d00b4e4aeefa51feb9fa486a02a1694891d67819c5c7
7
+ data.tar.gz: 6ffde82c2a3bd6434dd93e3ed305fa9d0c36af846aa4b4556ab47409fe032a56a27d4d7e8632c61772bd271e7c956a7712660ae5719c4c65341132ce25c482b7
data/CHANGELOG.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- ## [1.4.1] - 2025-08-xx
5
+ ## [1.3.4] - 2025-08-xx
6
6
 
7
7
  ### Added
8
8
 
@@ -10,6 +10,16 @@ All notable changes to this project will be documented in this file.
10
10
 
11
11
  ### Fixed
12
12
 
13
+ ## [1.3.3] - 2025-08-29
14
+
15
+ ### Added
16
+
17
+ - Better error handling
18
+
19
+ ### Fixed
20
+
21
+ - Unused parameter/variable `$includeArchivedNodes`
22
+
13
23
  ## [1.3.2] - 2025-08-19
14
24
 
15
25
  ### Added
@@ -63,6 +63,7 @@ module Ecoportal
63
63
  def parent_structure
64
64
  return unless _parent != self
65
65
  return unless _parent._parent != _parent
66
+ return unless _parent.is_a?(Base::LocationStructure)
66
67
 
67
68
  _parent._parent
68
69
  end
@@ -4,8 +4,16 @@ module Ecoportal
4
4
  module Logic
5
5
  class BaseQuery
6
6
  include Ecoportal::API::Common::GraphQL::ClassHelpers
7
+
7
8
  inheritable_attrs :accepted_params, :param_defaults
8
9
 
10
+ DETAIL_ERRORS = [
11
+ Faraday::ParsingError,
12
+ Graphlient::Errors::FaradayServerError,
13
+ Graphlient::Errors::GraphQLError,
14
+ Graphlient::Errors::ClientError
15
+ ].freeze
16
+
9
17
  class << self
10
18
  def param_defaults
11
19
  @param_defaults ||= {}
@@ -111,9 +119,9 @@ module Ecoportal
111
119
  raw_response[:data] = response
112
120
  end
113
121
  end
114
- rescue Faraday::ParsingError, Graphlient::Errors::FaradayServerError, Graphlient::Errors::GraphQLError => _err
122
+ rescue *DETAIL_ERRORS => _err
115
123
  pp kargs
116
- puts "Internal Error with these params:"
124
+ puts "Internal Error with these params:\n"
117
125
  pp query_params
118
126
  pp block
119
127
  raise
@@ -6,7 +6,6 @@ module Ecoportal
6
6
  module Draft
7
7
  class AddCommands < Logic::Mutation
8
8
  field_name :addCommandsToLocationDraft
9
- accepted_params :includeArchivedNodes, default: true
10
9
 
11
10
  class_resolver :payload_class, Payload::LocationStructure::Draft::AddCommands
12
11
  class_resolver :input_class, Input::LocationStructure::Draft::AddCommands
@@ -17,8 +16,7 @@ module Ecoportal
17
16
  payload_block = block || default_payload_block
18
17
  proc {
19
18
  mutation(
20
- input: :AddCommandsToLocationDraftInput!,
21
- includeArchivedNodes: :boolean
19
+ input: :AddCommandsToLocationDraftInput!
22
20
  ) {
23
21
  addCommandsToLocationDraft(
24
22
  input: :input,
@@ -35,7 +33,7 @@ module Ecoportal
35
33
  ___Ecoportal__API__GraphQL__Fragment__LocationDraft
36
34
  structure {
37
35
  nodes(
38
- includeArchived: :includeArchivedNodes
36
+ includeArchived: true
39
37
  ) {
40
38
  ___Ecoportal__API__GraphQL__Fragment__LocationNode
41
39
  }
@@ -7,8 +7,6 @@ module Ecoportal
7
7
  class Create < Logic::Mutation
8
8
  field_name :createLocationDraft
9
9
 
10
- accepted_params :includeArchivedNodes, default: true
11
-
12
10
  class_resolver :payload_class, Payload::LocationStructure::Draft::Create
13
11
  class_resolver :input_class, Input::LocationStructure::Draft::Create
14
12
 
@@ -18,8 +16,7 @@ module Ecoportal
18
16
  payload_block = block || default_payload_block
19
17
  proc {
20
18
  mutation(
21
- input: :CreateLocationDraftInput!,
22
- includeArchivedNodes: :boolean
19
+ input: :CreateLocationDraftInput!
23
20
  ) {
24
21
  createLocationDraft(
25
22
  input: :input,
@@ -36,7 +33,7 @@ module Ecoportal
36
33
  ___Ecoportal__API__GraphQL__Fragment__LocationDraft
37
34
  structure {
38
35
  nodes(
39
- includeArchived: :includeArchivedNodes
36
+ includeArchived: true
40
37
  ) {
41
38
  ___Ecoportal__API__GraphQL__Fragment__LocationNode
42
39
  }
@@ -6,8 +6,6 @@ module Ecoportal
6
6
  class DropBadCommands < Logic::Mutation
7
7
  field_name :dropBadCommandsFromLocationDraft
8
8
 
9
- accepted_params :includeArchivedNodes, default: true
10
-
11
9
  class_resolver :payload_class, Payload::LocationStructure::Draft::DropBadCommands
12
10
  class_resolver :input_class, Input::LocationStructure::Draft::DropBadCommands
13
11
 
@@ -17,8 +15,7 @@ module Ecoportal
17
15
  payload_block = block || default_payload_block
18
16
  proc {
19
17
  mutation(
20
- input: :DropBadCommandsFromLocationDraftInput!,
21
- includeArchivedNodes: :boolean
18
+ input: :DropBadCommandsFromLocationDraftInput!
22
19
  ) {
23
20
  dropBadCommandsFromLocationDraft(
24
21
  input: :input,
@@ -35,7 +32,7 @@ module Ecoportal
35
32
  ___Ecoportal__API__GraphQL__Fragment__LocationDraft
36
33
  structure {
37
34
  nodes(
38
- includeArchived: :includeArchivedNodes
35
+ includeArchived: true
39
36
  ) {
40
37
  ___Ecoportal__API__GraphQL__Fragment__LocationNode
41
38
  }
@@ -7,8 +7,6 @@ module Ecoportal
7
7
  class Publish < Logic::Mutation
8
8
  field_name :applyLocationDraft
9
9
 
10
- accepted_params :includeArchivedNodes, default: true
11
-
12
10
  class_resolver :payload_class, Payload::LocationStructure::Draft::Publish
13
11
  class_resolver :input_class, Input::LocationStructure::Draft::Publish
14
12
 
@@ -18,8 +16,7 @@ module Ecoportal
18
16
  payload_block = block || default_payload_block
19
17
  proc {
20
18
  mutation(
21
- input: :ApplyLocationDraftInput!,
22
- includeArchivedNodes: :boolean
19
+ input: :ApplyLocationDraftInput!
23
20
  ) {
24
21
  applyLocationDraft(
25
22
  input: :input,
@@ -34,7 +31,7 @@ module Ecoportal
34
31
  clientMutationId
35
32
  structure {
36
33
  nodes(
37
- includeArchived: :includeArchivedNodes
34
+ includeArchived: true
38
35
  ) {
39
36
  ___Ecoportal__API__GraphQL__Fragment__LocationNode
40
37
  }
@@ -1,5 +1,5 @@
1
1
  module Ecoportal
2
2
  module API
3
- GRAPQL_VERSION = '1.3.2'.freeze
3
+ GRAPQL_VERSION = '1.3.3'.freeze
4
4
  end
5
5
  end
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: 1.3.2
4
+ version: 1.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oscar Segura
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-08-20 00:00:00.000000000 Z
11
+ date: 2025-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry