class GraphQL::StaticValidation::NoDefinitionsArePresentError

Public Class Methods

new(message, path: nil, nodes: []) click to toggle source
Calls superclass method GraphQL::StaticValidation::Error::new
# File lib/graphql/static_validation/rules/no_definitions_are_present_error.rb, line 5
def initialize(message, path: nil, nodes: [])
  super(message, path: path, nodes: nodes)
end

Public Instance Methods

code() click to toggle source
# File lib/graphql/static_validation/rules/no_definitions_are_present_error.rb, line 20
def code
  "queryContainsSchemaDefinitions"
end
to_h() click to toggle source

A hash representation of this Message

Calls superclass method GraphQL::StaticValidation::Error#to_h
# File lib/graphql/static_validation/rules/no_definitions_are_present_error.rb, line 10
def to_h
  extensions = {
    "code" => code,
  }

  super.merge({
    "extensions" => extensions
  })
end