Class: Blog::Schema

Inherits:
GraphQL::Schema
  • Object
show all
Defined in:
app/graphql/blog/schema.rb

Class Method Summary collapse

Class Method Details

.resolve_type(abstract_type, obj, ctx) ⇒ Object

Union and Interface Resolution

Raises:

  • (GraphQL::RequiredImplementationMissingError)


19
20
21
22
23
# File 'app/graphql/blog/schema.rb', line 19

def self.resolve_type(abstract_type, obj, ctx)
  # TODO: Implement this method
  # to return the correct GraphQL object type for `obj`
  raise(GraphQL::RequiredImplementationMissingError)
end

.type_error(err, context) ⇒ Object

GraphQL-Ruby calls this when something goes wrong while running a query:



10
11
12
13
14
15
16
# File 'app/graphql/blog/schema.rb', line 10

def self.type_error(err, context)
  # if err.is_a?(GraphQL::InvalidNullError)
  #   # report to your bug tracker here
  #   return nil
  # end
  super
end