Class: ActiveShopifyGraphQL::Query::Node::Connection

Inherits:
ActiveShopifyGraphQL::Query::Node show all
Defined in:
lib/active_shopify_graphql/query/node/connection.rb

Overview

Renders connection fields using the nodes pattern. Example: orders(first: 10) { nodes { id createdAt } }

Constant Summary

Constants inherited from ActiveShopifyGraphQL::Query::Node

PAGE_INFO_FIELDS, STRING_KEYS_NEEDING_QUOTES

Instance Attribute Summary

Attributes inherited from ActiveShopifyGraphQL::Query::Node

#alias_name, #arguments, #children, #name

Instance Method Summary collapse

Methods inherited from ActiveShopifyGraphQL::Query::Node

#add_child, #has_children?, #initialize

Constructor Details

This class inherits a constructor from ActiveShopifyGraphQL::Query::Node

Instance Method Details

#to_sObject



9
10
11
12
# File 'lib/active_shopify_graphql/query/node/connection.rb', line 9

def to_s
  nested_fields = render_children
  "#{field_name_with_alias}#{format_arguments} { nodes { #{nested_fields.join(' ')} } }"
end