예제 #1
0
 /// <summary>
 /// will allow you to write queries on ProductVariant.
 /// </summary>
 public NodeQuery onProductVariant(ProductVariantDelegate buildQuery)
 {
     Query.Append("...on ProductVariant{");
     buildQuery(new ProductVariantQuery(Query));
     Query.Append("}");
     return(this);
 }
예제 #2
0
 /// <summary>
 /// will allow you to write queries on ProductVariant.
 /// </summary>
 public MetafieldParentResourceQuery onProductVariant(ProductVariantDelegate buildQuery)
 {
     Query.Append("...on ProductVariant{");
     buildQuery(new ProductVariantQuery(Query));
     Query.Append("}");
     return(this);
 }
예제 #3
0
        /// <summary>
        /// Find a product’s variant based on its selected options.
        /// This is useful for converting a user’s selection of product options into a single matching variant.
        /// If there is not a variant for the selected options, `null` will be returned.
        /// </summary>
        public ProductQuery variantBySelectedOptions(ProductVariantDelegate buildQuery, List <SelectedOptionInput> selectedOptions, string alias = null)
        {
            if (alias != null)
            {
                ValidationUtils.ValidateAlias(alias);

                Query.Append("variantBySelectedOptions___");
                Query.Append(alias);
                Query.Append(":");
            }

            Query.Append("variantBySelectedOptions ");

            Arguments args = new Arguments();

            args.Add("selectedOptions", selectedOptions);

            Query.Append(args.ToString());

            Query.Append("{");
            buildQuery(new ProductVariantQuery(Query));
            Query.Append("}");

            return(this);
        }
        /// <summary>
        /// The product variant object associated to the line item.
        /// </summary>
        public OrderLineItemQuery variant(ProductVariantDelegate buildQuery)
        {
            Query.Append("variant ");

            Query.Append("{");
            buildQuery(new ProductVariantQuery(Query));
            Query.Append("}");

            return(this);
        }
예제 #5
0
        /// <summary>
        /// The item at the end of ProductVariantEdge.
        /// </summary>
        public ProductVariantEdgeQuery node(ProductVariantDelegate buildQuery)
        {
            Query.Append("node ");

            Query.Append("{");
            buildQuery(new ProductVariantQuery(Query));
            Query.Append("}");

            return(this);
        }