Class: ActiveShopifyGraphQL::Query::Node::RootConnection
- Inherits:
-
ActiveShopifyGraphQL::Query::Node
- Object
- ActiveShopifyGraphQL::Query::Node
- ActiveShopifyGraphQL::Query::Node::RootConnection
- Defined in:
- lib/active_shopify_graphql/query/node/root_connection.rb
Overview
Renders a root-level connection query (no parent record). Example:
query {
customers(first: 10) {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
nodes {
...CustomerFragment
}
}
}
Constant Summary
Constants inherited from ActiveShopifyGraphQL::Query::Node
PAGE_INFO_FIELDS, STRING_KEYS_NEEDING_QUOTES
Instance Attribute Summary collapse
-
#fragment_name ⇒ Object
readonly
Returns the value of attribute fragment_name.
-
#fragments ⇒ Object
readonly
Returns the value of attribute fragments.
-
#query_name ⇒ Object
readonly
Returns the value of attribute query_name.
-
#singular ⇒ Object
readonly
Returns the value of attribute singular.
-
#variables ⇒ Object
readonly
Returns the value of attribute variables.
Attributes inherited from ActiveShopifyGraphQL::Query::Node
#alias_name, #arguments, #children, #name
Instance Method Summary collapse
-
#initialize(query_name:, fragment_name:, variables: {}, fragments: [], singular: false) ⇒ RootConnection
constructor
A new instance of RootConnection.
- #to_s ⇒ Object
Methods inherited from ActiveShopifyGraphQL::Query::Node
Constructor Details
#initialize(query_name:, fragment_name:, variables: {}, fragments: [], singular: false) ⇒ RootConnection
Returns a new instance of RootConnection.
24 25 26 27 28 29 30 31 |
# File 'lib/active_shopify_graphql/query/node/root_connection.rb', line 24 def initialize(query_name:, fragment_name:, variables: {}, fragments: [], singular: false) @query_name = query_name @fragment_name = fragment_name @variables = variables @fragments = fragments @singular = singular super(name: query_name) end |
Instance Attribute Details
#fragment_name ⇒ Object (readonly)
Returns the value of attribute fragment_name.
22 23 24 |
# File 'lib/active_shopify_graphql/query/node/root_connection.rb', line 22 def fragment_name @fragment_name end |
#fragments ⇒ Object (readonly)
Returns the value of attribute fragments.
22 23 24 |
# File 'lib/active_shopify_graphql/query/node/root_connection.rb', line 22 def fragments @fragments end |
#query_name ⇒ Object (readonly)
Returns the value of attribute query_name.
22 23 24 |
# File 'lib/active_shopify_graphql/query/node/root_connection.rb', line 22 def query_name @query_name end |
#singular ⇒ Object (readonly)
Returns the value of attribute singular.
22 23 24 |
# File 'lib/active_shopify_graphql/query/node/root_connection.rb', line 22 def singular @singular end |
#variables ⇒ Object (readonly)
Returns the value of attribute variables.
22 23 24 |
# File 'lib/active_shopify_graphql/query/node/root_connection.rb', line 22 def variables @variables end |
Instance Method Details
#to_s ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/active_shopify_graphql/query/node/root_connection.rb', line 33 def to_s(*) if @singular render_singular_connection else render_nodes_connection end end |