lib/graphiti_gql/schema.rb in graphiti_gql-0.2.29 vs lib/graphiti_gql/schema.rb in graphiti_gql-0.2.30

- old
+ new

@@ -31,10 +31,11 @@ GQL_TYPE_MAP = { integer_id: String, string: String, uuid: String, + gid: GraphQL::Types::ID, integer: Integer, big_integer: GraphQL::Types::BigInt, float: Float, boolean: GraphQL::Types::Boolean, date: GraphQL::Types::ISO8601Date, @@ -66,20 +67,23 @@ yield(object, next_args, arguments) end end def self.base_object + return @base_object if @base_object klass = Class.new(GraphQL::Schema::Object) + # TODO make this config maybe if defined?(ActionView) klass.send(:include, ActionView::Helpers::TranslationHelper) klass.class_eval do def initialize(*) super @virtual_path = "." end end end + @base_object = klass klass end def self.registry Registry.instance