Module: Ecoportal::API::GraphQL::Error::LocationsError::FetchNested
- Included in:
- Payload::LocationStructure::ApplyCommands, Payload::LocationStructure::CommandExecutionResult, Payload::LocationStructure::Draft::DropBadCommands, Payload::LocationStructure::Draft::Publish
- Defined in:
- lib/ecoportal/api/graphql/error/locations_error/fetch_nested.rb
Instance Method Summary collapse
- #loc_err_conflicting_ids ⇒ Object
- #loc_err_conflicting_ids? ⇒ Boolean
- #locations_error? ⇒ Boolean
- #locations_error_doc ⇒ Object
- #validationErrors ⇒ Object
- #validationErrors? ⇒ Boolean
Instance Method Details
#loc_err_conflicting_ids ⇒ Object
35 36 37 38 39 |
# File 'lib/ecoportal/api/graphql/error/locations_error/fetch_nested.rb', line 35 def loc_err_conflicting_ids return [] unless (err = error) err.conflictingIds || [] end |
#loc_err_conflicting_ids? ⇒ Boolean
27 28 29 |
# File 'lib/ecoportal/api/graphql/error/locations_error/fetch_nested.rb', line 27 def loc_err_conflicting_ids? loc_err_conflicting_ids.any? end |
#locations_error? ⇒ Boolean
21 22 23 24 25 |
# File 'lib/ecoportal/api/graphql/error/locations_error/fetch_nested.rb', line 21 def locations_error? return false if error.nil? !error.empty? end |
#locations_error_doc ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/ecoportal/api/graphql/error/locations_error/fetch_nested.rb', line 7 def locations_error_doc return unless locations_error? if loc_err_conflicting_ids? { conflictingIds: loc_err_conflicting_ids.doc } elsif validationErrors? { validationErrors: validationErrors.doc } end end |
#validationErrors ⇒ Object
41 42 43 44 45 |
# File 'lib/ecoportal/api/graphql/error/locations_error/fetch_nested.rb', line 41 def validationErrors return [] unless (err = error) err.validationErrors || [] end |
#validationErrors? ⇒ Boolean
31 32 33 |
# File 'lib/ecoportal/api/graphql/error/locations_error/fetch_nested.rb', line 31 def validationErrors? validationErrors.any? end |