Class: Blog::Schema
- Inherits:
-
GraphQL::Schema
- Object
- GraphQL::Schema
- Blog::Schema
- Defined in:
- app/graphql/blog/schema.rb
Class Method Summary collapse
-
.resolve_type(abstract_type, obj, ctx) ⇒ Object
Union and Interface Resolution.
-
.type_error(err, context) ⇒ Object
GraphQL-Ruby calls this when something goes wrong while running a query:.
Class Method Details
.resolve_type(abstract_type, obj, ctx) ⇒ Object
Union and Interface Resolution
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 |