module GraphQL::SmartSelect::ConnectionsProxy
Check field for Connections type Dig through edges -> nodes to db fields
Public Instance Methods
call(ctx) { || ... }
click to toggle source
# File lib/graphql/smart_select/connections_proxy.rb, line 12 def call(ctx) return yield unless ctx.field.connection? digging('node') do digging('edges') do yield end end end
digging(node_name) { |[node_name].values.first| ... }
click to toggle source
# File lib/graphql/smart_select/connections_proxy.rb, line 22 def digging(node_name) yield[node_name].scoped_children.values.first end