Sha256: 82e96edcd2f8218f6abf81c6c3fb86b7ca806876b42fe3e7caa07ad1a3bd5761

Contents?: true

Size: 1.4 KB

Versions: 4

Compression:

Stored size: 1.4 KB

Contents

# frozen_string_literal: true

module Rails # :nodoc:
  module GraphQL # :nodoc:
    # Error class tha wrappes all the other error classes
    StandardError = Class.new(::StandardError)

    # Error class related to problems during the definition process
    DefinitionError = Class.new(StandardError)

    # Error class related to validation of a value
    ValidationError = Class.new(StandardError)

    # Errors that can happen related to the arguments given to a method
    ArgumentError = Class.new(DefinitionError)

    # Errors related to the name of the objects
    NameError = Class.new(DefinitionError)

    # Errors related to duplciated objects
    DuplicatedError = Class.new(NameError)

    # Error class related to problems during the execution process
    ExecutionError = Class.new(StandardError)

    # Error related to the parsing process
    ParseError = Class.new(ExecutionError)

    # Error class related to problems that happened during execution of fields
    FieldError = Class.new(ExecutionError)

    # Error class related to when a field was not found on the requested object
    MissingFieldError = Class.new(FieldError)

    # Error class related to when a field was found but is marked as disabled
    DisabledFieldError = Class.new(FieldError)

    # Error class related to when the captured output value is invalid due to
    # type checking
    InvalidValueError = Class.new(FieldError)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rails-graphql-0.1.3 lib/rails/graphql/errors.rb
rails-graphql-0.1.2 lib/rails/graphql/errors.rb
rails-graphql-0.1.1 lib/rails/graphql/errors.rb
rails-graphql-0.1.0 lib/rails/graphql/errors.rb