Sha256: f2dd90c75ebe4f86e6153c3c3c45e363cf5554b1b0944c9eae4b31c175a35f3f

Contents?: true

Size: 1.26 KB

Versions: 50

Compression:

Stored size: 1.26 KB

Contents

# frozen_string_literal: true

module GraphQL
  module Types
    module Relay
      # Use this to implement Relay connections, or take it as inspiration
      # for Relay classes in your own app.
      #
      # You may wish to copy this code into your own base class,
      # so you can extend your own `BaseObject` instead of `GraphQL::Schema::Object`.
      #
      # @example Implementation a connection and edge
      #   # Given some object in your app ...
      #   class Types::Post < BaseObject
      #   end
      #
      #   # Make a couple of base classes:
      #   class Types::BaseEdge < GraphQL::Types::Relay::BaseEdge; end
      #   class Types::BaseConnection < GraphQL::Types::Relay::BaseConnection; end
      #
      #   # Then extend them for the object in your app
      #   class Types::PostEdge < Types::BaseEdge
      #     node_type(Types::Post)
      #   end
      #   class Types::PostConnection < Types::BaseConnection
      #     edge_type(Types::PostEdge)
      #     edges_nullable(true)
      #     edge_nullable(true)
      #     node_nullable(true)
      #     has_nodes_field(true)
      #   end
      #
      # @see Relay::BaseEdge for edge types
      class BaseConnection < Schema::Object
        include ConnectionBehaviors
      end
    end
  end
end

Version data entries

50 entries across 50 versions & 2 rubygems

Version Path
graphql-1.13.10 lib/graphql/types/relay/base_connection.rb
graphql-2.0.0 lib/graphql/types/relay/base_connection.rb
graphql-1.13.9 lib/graphql/types/relay/base_connection.rb
graphql-1.12.24 lib/graphql/types/relay/base_connection.rb
graphql-1.13.8 lib/graphql/types/relay/base_connection.rb
graphql-1.13.7 lib/graphql/types/relay/base_connection.rb
graphql-1.13.6 lib/graphql/types/relay/base_connection.rb
graphql-1.13.5 lib/graphql/types/relay/base_connection.rb
graphql-1.13.4 lib/graphql/types/relay/base_connection.rb
graphql-1.13.3 lib/graphql/types/relay/base_connection.rb
graphql-1.12.23 lib/graphql/types/relay/base_connection.rb
graphql-1.13.2 lib/graphql/types/relay/base_connection.rb
graphql-1.13.1 lib/graphql/types/relay/base_connection.rb
graphql-1.12.22 lib/graphql/types/relay/base_connection.rb
graphql-1.13.0 lib/graphql/types/relay/base_connection.rb
graphql-1.12.21 lib/graphql/types/relay/base_connection.rb
graphql-1.12.20 lib/graphql/types/relay/base_connection.rb
graphql-1.12.19 lib/graphql/types/relay/base_connection.rb
graphql-1.12.18 lib/graphql/types/relay/base_connection.rb
graphql-1.12.17 lib/graphql/types/relay/base_connection.rb