module GraphqlRails::Model::ClassMethods
static methods for GraphqlRails::Model
Public Instance Methods
graphql() { |it| ... }
click to toggle source
# File lib/graphql_rails/model.rb, line 29 def graphql @graphql ||= Model::Configuration.new(self) @graphql.tap { |it| yield(it) }.with_ensured_fields! if block_given? @graphql end
inherited(subclass)
click to toggle source
Calls superclass method
# File lib/graphql_rails/model.rb, line 22 def inherited(subclass) super subclass.instance_variable_set(:@graphql, graphql.dup) subclass.graphql.instance_variable_set(:@model_class, self) subclass.graphql.instance_variable_set(:@graphql_type, nil) end