Module: Ecoportal::API::GraphQL::Error::LocationsError::FetchNested
- Included in:
- Base::LocationStructure::Draft, 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
- #conflictingIds ⇒ Object
- #conflictingIds? ⇒ Boolean
- #locations_error? ⇒ Boolean
- #locations_error_doc ⇒ Object
- #validationErrors ⇒ Object
- #validationErrors? ⇒ Boolean
Instance Method Details
#conflictingIds ⇒ Object
33 34 35 36 37 |
# File 'lib/ecoportal/api/graphql/error/locations_error/fetch_nested.rb', line 33 def conflictingIds return [] unless (err = error) err.conflictingIds || [] end |
#conflictingIds? ⇒ Boolean
25 26 27 |
# File 'lib/ecoportal/api/graphql/error/locations_error/fetch_nested.rb', line 25 def conflictingIds? conflictingIds.any? end |
#locations_error? ⇒ Boolean
21 22 23 |
# File 'lib/ecoportal/api/graphql/error/locations_error/fetch_nested.rb', line 21 def locations_error? !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 conflictingIds? { conflictingIds: conflictingIds.doc } elsif validationErrors? { validationErrors: validationErrors.doc } end end |
#validationErrors ⇒ Object
39 40 41 42 43 |
# File 'lib/ecoportal/api/graphql/error/locations_error/fetch_nested.rb', line 39 def validationErrors return [] unless (err = error) err.validationErrors || [] end |
#validationErrors? ⇒ Boolean
29 30 31 |
# File 'lib/ecoportal/api/graphql/error/locations_error/fetch_nested.rb', line 29 def validationErrors? validationErrors.any? end |