class Alchemy::GraphQL::ElementType

Public Instance Methods

contents(only: nil, except: nil) click to toggle source
# File lib/alchemy/graphql/types/element_type.rb, line 20
def contents(only: nil, except: nil)
  contents = object.contents
  if only
    contents.where(name: only)
  elsif except
    contents.where.not(name: except)
  else
    contents
  end
end