Class: GraphQL::Functions::Element
- Defined in:
- lib/graphql/functions/element.rb
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#call(_, args, _) ⇒ Object
8 9 10 |
# File 'lib/graphql/functions/element.rb', line 8 def call(_, args, _) @model_class.find(args[:id]) end |
#type ⇒ Object
12 13 14 |
# File 'lib/graphql/functions/element.rb', line 12 def type @type ||= "Types::#{@model_class}Type".constantize end |