Sha256: 3ae1a7c411dc032aca6447403704cec3e122ce807a4f420575bf0f2786aacdc8

Contents?: true

Size: 560 Bytes

Versions: 15

Compression:

Stored size: 560 Bytes

Contents

module GraphitiGraphQL
  module Federation
    class FederatedRelationship
      attr_reader :name, :local_resource_class, :foreign_key, :params_block

      def initialize(kind, name, local_resource_class, foreign_key)
        @kind = kind
        @name = name
        @local_resource_class = local_resource_class
        @foreign_key = foreign_key
      end

      def has_many?
        @kind == :has_many
      end

      def belongs_to?
        @kind == :belongs_to
      end

      def params(&blk)
        @params_block = blk
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
graphiti_graphql-0.1.17 lib/graphiti_graphql/federation/federated_relationship.rb
graphiti_graphql-0.1.16 lib/graphiti_graphql/federation/federated_relationship.rb
graphiti_graphql-0.1.15 lib/graphiti_graphql/federation/federated_relationship.rb
graphiti_graphql-0.1.14 lib/graphiti_graphql/federation/federated_relationship.rb
graphiti_graphql-0.1.12 lib/graphiti_graphql/federation/federated_relationship.rb
graphiti_graphql-0.1.11 lib/graphiti_graphql/federation/federated_relationship.rb
graphiti_graphql-0.1.10 lib/graphiti_graphql/federation/federated_relationship.rb
graphiti_graphql-0.1.9 lib/graphiti_graphql/federation/federated_relationship.rb
graphiti_graphql-0.1.8 lib/graphiti_graphql/federation/federated_relationship.rb
graphiti_graphql-0.1.7 lib/graphiti_graphql/federation/federated_relationship.rb
graphiti_graphql-0.1.6 lib/graphiti_graphql/federation/federated_relationship.rb
graphiti_graphql-0.1.5 lib/graphiti_graphql/federation/federated_relationship.rb
graphiti_graphql-0.1.4 lib/graphiti_graphql/federation/federated_relationship.rb
graphiti_graphql-0.1.3 lib/graphiti_graphql/federation/federated_relationship.rb
graphiti_graphql-0.1.2 lib/graphiti_graphql/federation/federated_relationship.rb