Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/_data/toc/graphql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ pages:
- label: GraphQL Caching
url: /graphql/caching.html

- label: Filtering with custom attributes
url: /graphql/custom-filters.html

- label: Development
children:
- label: Define the GraphQL schema for a module
Expand Down Expand Up @@ -50,6 +53,9 @@ pages:
- label: category query
url: /graphql/queries/category.html

- label: categoryList query
url: /graphql/queries/category-list.html

- label: checkoutAgreements query
url: /graphql/queries/checkout-agreements.html

Expand All @@ -74,6 +80,9 @@ pages:
- label: customer query
url: /graphql/queries/customer.html

- label: customerCart query
url: /graphql/queries/customer-cart.html

- label: customerDownloadableProducts query
url: /graphql/queries/customer-downloadable-products.html

Expand Down Expand Up @@ -112,9 +121,15 @@ pages:
- label: Using mutations
url: /graphql/mutations/index.html

- label: addBundleProductsToCart mutation
url: /graphql/mutations/add-bundle-products.html

- label: addConfigurableProductsToCart mutation
url: /graphql/mutations/add-configurable-products.html

- label: addDownloadableProductsToCart mutation
url: /graphql/mutations/add-downloadable-products.html

- label: addSimpleProductsToCart mutation
url: /graphql/mutations/add-simple-products.html

Expand Down Expand Up @@ -163,6 +178,9 @@ pages:
- label: handlePayflowProResponse mutation
url: /graphql/mutations/handle-payflow-pro-response.html

- label: mergeCarts mutation
url: /graphql/mutations/merge-carts.html

- label: placeOrder mutation
url: /graphql/mutations/place-order.html

Expand Down
5 changes: 4 additions & 1 deletion src/_includes/graphql/cart-object.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
Attribute | Data Type | Description
--- | --- | ---
`applied_coupon` | [`AppliedCoupon`][AppliedCoupon] | The `AppliedCoupon` object contains the `code` text attribute, which specifies the coupon code
`applied_coupon` | [`AppliedCoupon`][AppliedCoupon] | Deprecated. Use `applied_coupons` instead
`applied_coupons` | [[`AppliedCoupon`]][AppliedCoupon] | An array of `AppliedCoupon` objects. Each object contains the `code` text attribute, which specifies the coupon code
`applied_gift_cards` | [[`AppliedGiftCard`]][AppliedGiftCard] | An array of `AppliedGiftCard` objects. An `AppliedGiftCard` object contains the `code` text attribute, which specifies the gift card code. `applied_gift_cards` is a Commerce-only attribute, defined in the GiftCardAccountGraphQl module
`applied_store_credit` | [`AppliedStoreCredit`][AppliedStoreCredit] | Contains store credit information applied to the cart. `applied_store_credit` is a Commerce-only attribute, defined in the CustomerBalanceGraphQl module
`available_payment_methods` | [[AvailablePaymentMethod]][AvailablePaymentMethod] | Available payment methods
`billing_address` | [BillingCartAddress][BillingCartAddress] | Contains the billing address specified in the customer's cart
`email` | String | The customer's email address
`id` | ID! | The ID of the cart
`is_virtual` | Boolean | Indicates whether the cart contains only virtual products
`items` | [[CartItemInterface]][CartItemInterface] | Contains the items in the customer's cart
`prices` | [CartPrices][CartPrices] | Contains subtotals and totals
`selected_payment_method` | [SelectedPaymentMethod][SelectedPaymentMethod] | Selected payment method
Expand Down
3 changes: 2 additions & 1 deletion src/_includes/graphql/create-customer.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Attribute | Data Type | Description
--- | --- | ---
`dob` | String | The customer’s date of birth
`date_of_birth` | String | The customer’s date of birth
`dob` | String | Deprecated. Use `date_of_birth` instead. The customer’s date of birth
`email` | String | The customer’s email address. Required to create a customer
`firstname` | String | The customer’s first name. Required to create a customer
`gender` | Int | The customer's gender (Male - 1, Female - 2)
Expand Down
9 changes: 5 additions & 4 deletions src/_includes/graphql/customer-address-input.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ Attribute | Data Type | Description
--- | --- | ---
`city` | String | The city or town
`company` | String | The customer's company
`country_id` | String | The customer's country
`custom_attributes` | [CustomerAddressAttributeInput](#customerAddressAttributeInput) | Address custom attributes
`country_code` | String | The customer's country
`country_id` | String | Deprecated. Use `country_code` instead. The customer's country
`custom_attributes` | [CustomerAddressAttributeInput](#customerAddressAttributeInput) | Deprecated. Not applicable for GraphQL
`customer_id` | Int | The customer ID
`default_billing` | Boolean | Indicates whether the address is the default billing address
`default_shipping` | Boolean | Indicates whether the address is the default shipping address
Expand All @@ -20,7 +21,7 @@ Attribute | Data Type | Description
`postcode` | String | The customer's ZIP or postal code
`prefix` | String | An honorific, such as Dr., Mr., or Mrs.
`region` | [CustomerAddressRegionInput](#customerAddressRegionInput) | An object that defines the customer's state or province
`region_id` | Int | A number that uniquely identifies the state, province, or other area
`region_id` | Int | Deprecated. Use `region` instead. A number that uniquely identifies the state, province, or other area
`street` | [String] | An array of strings that define the street number and name
`suffix` | String | A value such as Sr., Jr., or III
`telephone` | String | The telephone number
Expand All @@ -43,4 +44,4 @@ Attribute | Data Type | Description
--- | --- | ---
`region` | String | The state or province name
`region_code` | String | The address region code
`region_id` | Int | Uniquely identifies the region
`region_id` | Int | Deprecated. Use `region` instead. Uniquely identifies the region
11 changes: 6 additions & 5 deletions src/_includes/graphql/customer-address-output.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ Attribute | Data Type | Description
--- | --- | ---
`city` | String | The city or town
`company` | String | The customer's company
`country_id` | String | The customer's country
`custom_attributes` | [CustomerAddressAttribute](#customerAddressAttributeOutput) | Address custom attributes
`country_code` | CountryCodeEnum | The customer's country
`country_id` | String | Deprecated. Use `country_code` instead. The customer's country
`custom_attributes` | [CustomerAddressAttribute](#customerAddressAttributeOutput) | Deprecated. Not applicable for GraphQL
`customer_id` | Int | The customer ID
`default_billing` | Boolean | Indicates whether the address is the default billing address
`default_shipping` | Boolean | Indicates whether the address is the default shipping address
Expand All @@ -22,15 +23,15 @@ Attribute | Data Type | Description
`postcode` | String | The customer's ZIP or postal code
`prefix` | String | An honorific, such as Dr., Mr., or Mrs.
`region` | [CustomerAddressRegion](#customerAddressRegionOutput) | An object that defines the customer's state or province
`region_id` | Int | A number that uniquely identifies the state, province, or other area
`region_id` | Int | Deprecated. Use `region` instead. A number that uniquely identifies the state, province, or other area
`street` | [String] | An array of strings that define the street number and name
`suffix` | String | A value such as Sr., Jr., or III
`telephone` | String | The telephone number
`vat_id` | String | The customer's Tax/VAT number (for corporate customers)

### CustomerAddressAttribute attributes {#customerAddressAttributeOutput}

The `CustomerAddressAttribute` object contains the following attributes:
The `CustomerAddressAttribute` output data type has been deprecated because the contents are not applicable for GraphQL. It can contain the following attributes:

Attribute | Data Type | Description
--- | --- | ---
Expand All @@ -45,4 +46,4 @@ Attribute | Data Type | Description
--- | --- | ---
`region` | String | The state or province name
`region_code` | String | The address region code
`region_id` | Int | Uniquely identifies the region
`region_id` | Int | Deprecated. Use `region` instead. Uniquely identifies the region
7 changes: 4 additions & 3 deletions src/_includes/graphql/customer-input.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ Attribute | Data Type | Description
--- | --- | ---
`addresses` | [CustomerAddress](#customerAddressInput) | An array containing the customer's shipping and billing addresses
`created_at` | String | Timestamp indicating when the account was created
`date_of_birth` | String | The customer's date of birth
`default_billing` | String | The ID assigned to the billing address
`default_shipping` | String | The ID assigned to the shipping address
`dob` | String | The customer's date of birth
`dob` | String | Deprecated. Use `date_of_birth` instead. The customer's date of birth
`email` | String | The customer's email address
`firstname` | String | The customer's first name
`gender` | Int | The customer's gender (Male - 1, Female - 2)
`group_id` | Int | The group assigned to the user. Default values are 0 (Not logged in), 1 (General), 2 (Wholesale), and 3 (Retailer)
`group_id` | Int | Deprecated. This attribute is not applicable for GraphQL. The group assigned to the user. Default values are 0 (Not logged in), 1 (General), 2 (Wholesale), and 3 (Retailer)
`id` | Int | The ID assigned to the customer
`is_subscribed` | Boolean | Indicates whether the customer is subscribed to the company's newsletter
`lastname` | String | The customer's family name
Expand All @@ -17,4 +18,4 @@ Attribute | Data Type | Description
`suffix` | String | A value such as Sr., Jr., or III
`taxvat` | String | The customer's Tax/VAT number (for corporate customers)

{% include graphql/customer-address-input.md %}
{% include graphql/customer-address-input.md %}
8 changes: 5 additions & 3 deletions src/_includes/graphql/customer-output.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,21 @@ Attribute | Data Type | Description
--- | --- | ---
`addresses` | [CustomerAddress](#customerAddressOutput) | An array containing the customer's shipping and billing addresses
`created_at` | String | Timestamp indicating when the account was created
`date_of_birth` | String | The customer's date of birth
`default_billing` | String | The ID assigned to the billing address
`default_shipping` | String | The ID assigned to the shipping address
`dob` | String | The customer's date of birth
`dob` | String | Deprecated. Use `date_of_birth` instead. The customer's date of birth
`email` | String | The customer's email address
`firstname` | String | The customer's first name
`gender` | Int | The customer's gender (Male - 1, Female - 2)
`group_id` | Int | The group assigned to the user. Default values are 0 (Not logged in), 1 (General), 2 (Wholesale), and 3 (Retailer)
`group_id` | Int | Deprecated. This attribute is not applicable for GraphQL. The group assigned to the user. Default values are 0 (Not logged in), 1 (General), 2 (Wholesale), and 3 (Retailer)
`id` | Int | The ID assigned to the customer
`is_subscribed` | Boolean | Indicates whether the customer is subscribed to the company's newsletter
`lastname` | String | The customer's family name
`middlename` |String | The customer's middle name
`prefix` | String | An honorific, such as Dr., Mr., or Mrs.
`suffix` | String | A value such as Sr., Jr., or III
`taxvat` | String | The customer's Tax/VAT number (for corporate customers)
`wishlist` | Wishlist! | Contains the contents of the customer's wish lists

{% include graphql/customer-address-output.md %}
{% include graphql/customer-address-output.md %}
3 changes: 2 additions & 1 deletion src/guides/v2.3/graphql/caching.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ The definitions for some queries include cache tags. Full page caching uses thes

Magento caches the following queries:

* `category`
* `category` (deprecated)
* `categoryList`
* `cmsBlocks`
* `cmsPage`
* `products`
Expand Down
4 changes: 2 additions & 2 deletions src/guides/v2.3/graphql/develop/create-graphqls-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ The following example shows the `products` query. The `type` is defined as a `Qu
type Query {
products (
search: String
filter: ProducFilterInput
filter: ProductAttributeFilterInput
pageSize: Int = 20
currentPage: Int = 1
sort: ProductSortInput
sort: ProductAttributeSortInput
): Products @resolver(class: "Magento\\CatalogGraphQl\\Model\\Resolver\\Products")
}
```
Expand Down
Loading