Class: ActiveShopifyGraphQL::Query::Node::Singular
- Inherits:
-
ActiveShopifyGraphQL::Query::Node
- Object
- ActiveShopifyGraphQL::Query::Node
- ActiveShopifyGraphQL::Query::Node::Singular
- Defined in:
- lib/active_shopify_graphql/query/node/singular.rb
Overview
Renders singular association fields (has_one relationships).
Example: defaultAddress { city country zip }
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_s ⇒ Object
9 10 11 12 |
# File 'lib/active_shopify_graphql/query/node/singular.rb', line 9 def to_s nested_fields = render_children "#{field_name_with_alias}#{format_arguments} { #{nested_fields.join(' ')} }" end |