From 483ea98c9a2dfe69d06a04b7adee9a666e50c6a9 Mon Sep 17 00:00:00 2001 From: Rakesh Jesadiya Date: Thu, 3 Dec 2020 18:49:34 +0530 Subject: [PATCH 1/4] Update category-list.md Give Example of url_key and url_path attribute with categoryList query. --- .../v2.3/graphql/queries/category-list.md | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/src/guides/v2.3/graphql/queries/category-list.md b/src/guides/v2.3/graphql/queries/category-list.md index 81425e74864..bf094e56c32 100644 --- a/src/guides/v2.3/graphql/queries/category-list.md +++ b/src/guides/v2.3/graphql/queries/category-list.md @@ -276,6 +276,86 @@ The following query returns breadcrumb information about categories that have th } ``` +### Return the categoryList by url_key filters + +The following query returns information about category by url_key filters. You have to pass url_key value without suffix with `eq` or `in` keyword. Get the categoryList response from the `Gear` category. + +**Request:** + +```graphql +{ + categoryList(filters: { url_key: { eq: "gear" } }) { + id + level + name + path + url_path + url_key + children_count + } +} +``` + +**Response:** + +```json +{ + "data": { + "categoryList": [ + { + "id": 3, + "level": 2, + "name": "Gear", + "path": "1/2/3", + "url_path": "gear", + "url_key": "gear", + "children_count": "3" + } + ] + } +} +``` + +### Return the categoryList by url_path filters + +The following query returns information about category by url_path filters. You have to pass url_path value without suffix with `eq` or `in` keyword. Get the categoryList response from the `Gear -> Bags` category. + +**Request:** + +```graphql +{ + categoryList(filters: { url_path: { eq: "gear/bags" } }) { + id + level + name + path + url_path + url_key + children_count + } +} +``` + +**Response:** + +```json +{ + "data": { + "categoryList": [ + { + "id": 4, + "level": 3, + "name": "Bags", + "path": "1/2/3/4", + "url_path": "gear/bags", + "url_key": "bags", + "children_count": "0" + } + ] + } +} +``` + ## Input attributes You must specify the `filters` attribute as input to your query. From b6e74c012a17ce004b648859d2fbd4d523a6b6f2 Mon Sep 17 00:00:00 2001 From: Rakesh Jesadiya Date: Thu, 3 Dec 2020 19:27:45 +0530 Subject: [PATCH 2/4] Update category-list.md --- src/guides/v2.3/graphql/queries/category-list.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/guides/v2.3/graphql/queries/category-list.md b/src/guides/v2.3/graphql/queries/category-list.md index bf094e56c32..aa1511b95eb 100644 --- a/src/guides/v2.3/graphql/queries/category-list.md +++ b/src/guides/v2.3/graphql/queries/category-list.md @@ -278,7 +278,7 @@ The following query returns breadcrumb information about categories that have th ### Return the categoryList by url_key filters -The following query returns information about category by url_key filters. You have to pass url_key value without suffix with `eq` or `in` keyword. Get the categoryList response from the `Gear` category. +The following query returns information about categories by `url_key` filters. You have to pass the `url_key` value without a suffix and with either the `eq` or `in` keywords. Get the categoryList response from the `Gear` category. **Request:** @@ -318,7 +318,7 @@ The following query returns information about category by url_key filters. You h ### Return the categoryList by url_path filters -The following query returns information about category by url_path filters. You have to pass url_path value without suffix with `eq` or `in` keyword. Get the categoryList response from the `Gear -> Bags` category. +The following query returns information about categories by `url_path` filters. You have to pass the `url_path` value without a suffix and with either the `eq` or `in` keywords. Get the categoryList response from the `Gear -> Bags` category. **Request:** From 06ddbc8b9ad511279a6332c275eaeabb727e5707 Mon Sep 17 00:00:00 2001 From: Rakesh Jesadiya Date: Mon, 7 Dec 2020 10:46:58 +0530 Subject: [PATCH 3/4] Update category-list.md --- src/guides/v2.3/graphql/queries/category-list.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/guides/v2.3/graphql/queries/category-list.md b/src/guides/v2.3/graphql/queries/category-list.md index aa1511b95eb..a57bc72cd82 100644 --- a/src/guides/v2.3/graphql/queries/category-list.md +++ b/src/guides/v2.3/graphql/queries/category-list.md @@ -278,7 +278,7 @@ The following query returns breadcrumb information about categories that have th ### Return the categoryList by url_key filters -The following query returns information about categories by `url_key` filters. You have to pass the `url_key` value without a suffix and with either the `eq` or `in` keywords. Get the categoryList response from the `Gear` category. +The following query returns information about the Gear category using a `url_key` filter. You must pass the `url_key` value without a suffix and specify either the `eq` or `in` keyword. **Request:** @@ -318,7 +318,7 @@ The following query returns information about categories by `url_key` filters. Y ### Return the categoryList by url_path filters -The following query returns information about categories by `url_path` filters. You have to pass the `url_path` value without a suffix and with either the `eq` or `in` keywords. Get the categoryList response from the `Gear -> Bags` category. +The following query returns information about the Gear > Bags` category using the `url_path` filter. Do not specify a suffix in the `url_path` value. The `url_path` filter accepts either the `eq` or `in` keyword. **Request:** From 771015933f15468015431b6af4bc4603cbef2cad Mon Sep 17 00:00:00 2001 From: Kevin Harper Date: Tue, 8 Dec 2020 07:36:08 -0600 Subject: [PATCH 4/4] Update category-list.md --- src/guides/v2.3/graphql/queries/category-list.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/guides/v2.3/graphql/queries/category-list.md b/src/guides/v2.3/graphql/queries/category-list.md index a57bc72cd82..98ca81871bd 100644 --- a/src/guides/v2.3/graphql/queries/category-list.md +++ b/src/guides/v2.3/graphql/queries/category-list.md @@ -318,7 +318,7 @@ The following query returns information about the Gear category using a `url_key ### Return the categoryList by url_path filters -The following query returns information about the Gear > Bags` category using the `url_path` filter. Do not specify a suffix in the `url_path` value. The `url_path` filter accepts either the `eq` or `in` keyword. +The following query returns information about the Gear > Bags category using the `url_path` filter. Do not specify a suffix in the `url_path` value. The `url_path` filter accepts either the `eq` or `in` keyword. **Request:**