Module: GraphQL::Schema::Member::RelayShortcuts Private
- Included in:
- Interface::DefinitionMethods, GraphQL::Schema::Member
- Defined in:
- lib/graphql/schema/member/relay_shortcuts.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #connection_type ⇒ Object private
- #connection_type_class(new_connection_type_class = nil) ⇒ Object private
- #edge_type ⇒ Object private
- #edge_type_class(new_edge_type_class = nil) ⇒ Object private
Instance Method Details
#connection_type ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
34 35 36 37 38 39 40 41 42 43 |
# File 'lib/graphql/schema/member/relay_shortcuts.rb', line 34 def connection_type @connection_type ||= begin conn_name = self.graphql_name + "Connection" edge_type_class = self.edge_type Class.new(connection_type_class) do graphql_name(conn_name) edge_type(edge_type_class) end end end |
#connection_type_class(new_connection_type_class = nil) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
15 16 17 18 19 20 21 |
# File 'lib/graphql/schema/member/relay_shortcuts.rb', line 15 def connection_type_class(new_connection_type_class = nil) if new_connection_type_class @connection_type_class = new_connection_type_class else @connection_type_class || find_inherited_method(:connection_type_class, Types::Relay::BaseConnection) end end |
#edge_type ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/graphql/schema/member/relay_shortcuts.rb', line 23 def edge_type @edge_type ||= begin edge_name = self.graphql_name + "Edge" node_type_class = self Class.new(edge_type_class) do graphql_name(edge_name) node_type(node_type_class) end end end |
#edge_type_class(new_edge_type_class = nil) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
7 8 9 10 11 12 13 |
# File 'lib/graphql/schema/member/relay_shortcuts.rb', line 7 def edge_type_class(new_edge_type_class = nil) if new_edge_type_class @edge_type_class = new_edge_type_class else @edge_type_class || find_inherited_method(:edge_type_class, Types::Relay::BaseEdge) end end |