Sha256: bde9d76b86212f0c8875743bbe2468a857917b2cf7b3f08407e522d2fcf99e73
Contents?: true
Size: 766 Bytes
Versions: 4
Compression:
Stored size: 766 Bytes
Contents
module Types class QueryType < Types::BaseObject add_field(GraphQL::Types::Relay::NodeField) add_field(GraphQL::Types::Relay::NodesField) SoulsHelper.get_tables.each do |t| field t.singularize.underscore.to_s.to_sym, resolver: Object.const_get("Queries::#{t.singularize.camelize}") field "#{t.singularize.underscore}_search".to_sym, resolver: Object.const_get("Resolvers::#{t.singularize.camelize}Search") field t.pluralize.underscore.to_s.to_sym, Object.const_get("Types::#{t.singularize.camelize}Type").connection_type, null: true define_method t do Object.const_get(t.singularize.camelize.to_s).all.order(id: :desc) end end field :me, resolver: Queries::Me end end
Version data entries
4 entries across 4 versions & 1 rubygems