From 557db3785b5136f9f576d46ca9f7841b12c8e409 Mon Sep 17 00:00:00 2001 From: PedroAntunesCosta <47991446+PedroAntunesCosta@users.noreply.github.com> Date: Wed, 15 Jun 2022 18:19:38 -0300 Subject: [PATCH 01/12] New `Exploring the API` section Also some minor corrections to the first part --- apps/docs/docs/reference/api/faststore-api.md | 28 +++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/apps/docs/docs/reference/api/faststore-api.md b/apps/docs/docs/reference/api/faststore-api.md index 8b31d9610e..49a0adaa53 100644 --- a/apps/docs/docs/reference/api/faststore-api.md +++ b/apps/docs/docs/reference/api/faststore-api.md @@ -7,13 +7,15 @@ import GraphQLExplorer from '@site/src/components/GraphQLExplorer/GraphQLExplore # FastStore API -**FastStore API** is an interface between your ecommerce platform and your store's frontend. It uses **[GraphQL](https://graphql.org/)**, a query language for APIs and a runtime for fulfilling queries, to expose structured data from everyday e-commerce tasks to frontend components. With the FastStore API, it's possible to: +**FastStore API** is an interface between your ecommerce platform and your store's frontend. It uses **[GraphQL](https://graphql.org/)**, a query language for APIs and a runtime for fulfilling queries, in order to expose structured data from everyday ecommerce tasks to frontend components. + +With the FastStore API, you can: - Retrieve product data. - Add items to the cart. - Apply promotions to products. - Filter search results. -Also, thanks to a type-safe **GraphQL** protocol, the FastStore API allows developers to fetch only the strongly **typed data** needed for building robust and responsive solutions. In practice, developers can source the FastStore API to the [**Next.js**](https://nextjs.org/) or [**Gatsby**](https://www.gatsbyjs.com/) data layers and consume it on frontend components to create stores that use the [**Jamstack**](https://jamstack.org/) architecture. +Also, thanks to a type-safe **GraphQL** protocol, the FastStore API allows developers to fetch only the strongly typed data needed for building robust and responsive solutions. In practice, developers can source the FastStore API to the [**Next.js**](https://nextjs.org/) or [**Gatsby**](https://www.gatsbyjs.com/) data layers and consume it on frontend components to create stores that use the [**Jamstack**](https://jamstack.org/) architecture. ![FastStore API usage architecture](https://vtexhelp.vtexassets.com/assets/docs/src/faststoreAPI2___58c4a9c4d23539900ef8b1cce9769288.png) @@ -21,11 +23,13 @@ Also, thanks to a type-safe **GraphQL** protocol, the FastStore API allows devel To learn more about GraphQL and its main concepts, visit the official [GraphQL website](https://graphql.org/). ::: -## Playground +## Exploring the API + +It is a good idea to explore the FastStore API and get to know the data structure you can query and mutate from your store's frontend. There are a few different ways to do that, as described below. -The FastStore GraphQL API allows you to query and modify your store public data in an efficient and flexible manner. +### Playground -Use the GraphQL playground in the following to test and explore the FastStore API. +You can use the GraphQL playground below to test and explore the FastStore API. +### GraphiQL + +GraphiQL is an IDE you can launch from your browser in order to run GraphQL queries and mutations. This option has the advantage of displaying the reference documentation for each type and field in the `Docs` tab. + +To use GraphiQL in your FastStore project, follow these steps: +1. If you do not have the latest version installed, run `yarn` in your project to reinstall the `@faststore/api` dependency. +2. Run `yarn develop` to start a local server. +3. Access GraphiQL by going to this address: + +``` +http://localhost:8000/___graphql +``` + + ## Key features FastStore API is based on [**Schema.org**](https://schema.org/) and inspired by **clean architecture**. From ef38caed620ac12244be108b7baf3e3225111f8a Mon Sep 17 00:00:00 2001 From: PedroAntunesCosta <47991446+PedroAntunesCosta@users.noreply.github.com> Date: Wed, 15 Jun 2022 18:25:09 -0300 Subject: [PATCH 02/12] Minor corrections --- apps/docs/docs/reference/api/faststore-api.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/docs/docs/reference/api/faststore-api.md b/apps/docs/docs/reference/api/faststore-api.md index 49a0adaa53..c97532638c 100644 --- a/apps/docs/docs/reference/api/faststore-api.md +++ b/apps/docs/docs/reference/api/faststore-api.md @@ -54,16 +54,15 @@ To use GraphiQL in your FastStore project, follow these steps: http://localhost:8000/___graphql ``` - ## Key features FastStore API is based on [**Schema.org**](https://schema.org/) and inspired by **clean architecture**. -### Improved brand's findability +### Improved brand findability FastStore API extends and simplifies [**Schema.org**](https://schema.org/), a set of agreed definitions for implementing structured data developed by Google, Microsoft, Yahoo, and Yandex. -The Schema markup aids search engines in understanding and displaying your content in a relevant way. It may improve your brand's findability by leading your website to a higher ranking in search results and, consequently, to more clicks and interactions with your store's website. +The Schema markup aids search engines in understanding and displaying your content in a relevant way. It may improve your brand's findability by leading your website to a higher ranking in search results and, as a result, to more clicks and interactions with your store's website. ### Flexible backend for frontend architecture From 7b143deee486ab03ef1a9539b71363eaa36c1765 Mon Sep 17 00:00:00 2001 From: PedroAntunesCosta <47991446+PedroAntunesCosta@users.noreply.github.com> Date: Wed, 15 Jun 2022 18:45:15 -0300 Subject: [PATCH 03/12] Adjusting content due to `get-started` guide --- apps/docs/docs/reference/api/faststore-api.md | 47 +++++++------------ 1 file changed, 16 insertions(+), 31 deletions(-) diff --git a/apps/docs/docs/reference/api/faststore-api.md b/apps/docs/docs/reference/api/faststore-api.md index c97532638c..54dad57719 100644 --- a/apps/docs/docs/reference/api/faststore-api.md +++ b/apps/docs/docs/reference/api/faststore-api.md @@ -23,37 +23,6 @@ Also, thanks to a type-safe **GraphQL** protocol, the FastStore API allows devel To learn more about GraphQL and its main concepts, visit the official [GraphQL website](https://graphql.org/). ::: -## Exploring the API - -It is a good idea to explore the FastStore API and get to know the data structure you can query and mutate from your store's frontend. There are a few different ways to do that, as described below. - -### Playground - -You can use the GraphQL playground below to test and explore the FastStore API. - - - -### GraphiQL - -GraphiQL is an IDE you can launch from your browser in order to run GraphQL queries and mutations. This option has the advantage of displaying the reference documentation for each type and field in the `Docs` tab. - -To use GraphiQL in your FastStore project, follow these steps: -1. If you do not have the latest version installed, run `yarn` in your project to reinstall the `@faststore/api` dependency. -2. Run `yarn develop` to start a local server. -3. Access GraphiQL by going to this address: - -``` -http://localhost:8000/___graphql -``` - ## Key features FastStore API is based on [**Schema.org**](https://schema.org/) and inspired by **clean architecture**. @@ -71,3 +40,19 @@ The FastStore API types and resolvers use a clean architecture to tackle specifi 1. Develop an ecommerce website with Next.js or Gatsby. 2. Create an Apollo Server instance on Heroku. 3. Run the executable schema in a function on Next.js. + +## Playground + +You can use the GraphQL playground below to test and explore the FastStore API. + + + +You can also install the `@faststore/api` dependency in your project to start exploring the data layer by running a local server. Learn more in the [Get started guide](/reference/api/get-started). From cdd1cef446388db5ba96bab4789cd9c7c4dd9454 Mon Sep 17 00:00:00 2001 From: PedroAntunesCosta <47991446+PedroAntunesCosta@users.noreply.github.com> Date: Tue, 28 Jun 2022 11:27:52 -0300 Subject: [PATCH 04/12] Adding `going beyond` section to FastStore API landing article --- apps/docs/docs/reference/api/faststore-api.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/docs/docs/reference/api/faststore-api.md b/apps/docs/docs/reference/api/faststore-api.md index 48454a2ef8..39b480d91d 100644 --- a/apps/docs/docs/reference/api/faststore-api.md +++ b/apps/docs/docs/reference/api/faststore-api.md @@ -57,3 +57,9 @@ You can use the GraphQL playground below to test and explore the FastStore API. }"/> You can also install the `@faststore/api` dependency in your project to start exploring the data layer by running a local server. Learn more in the [Get started guide](/reference/api/get-started). + +## Going beyond + +With GraphQL, you can also [Extend the FastStore API schema](/how-to-guides/faststore-api/extending-the-faststore-api). + +And if you wish to use an ecommerce platform that is not yet supported, see how you can [Create inline resolvers](/how-to-guides/faststore-api/creating-resolvers). From 2dd2a9928dc6bcb372a8df7d8855199c794c5024 Mon Sep 17 00:00:00 2001 From: PedroAntunesCosta <47991446+PedroAntunesCosta@users.noreply.github.com> Date: Tue, 28 Jun 2022 11:30:12 -0300 Subject: [PATCH 05/12] moving the API `get-started.md` article to `how-to-guides` --- .../api => how-to-guides/faststore-api}/get-started.md | 0 apps/docs/docs/reference/api/faststore-api.md | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename apps/docs/docs/{reference/api => how-to-guides/faststore-api}/get-started.md (100%) diff --git a/apps/docs/docs/reference/api/get-started.md b/apps/docs/docs/how-to-guides/faststore-api/get-started.md similarity index 100% rename from apps/docs/docs/reference/api/get-started.md rename to apps/docs/docs/how-to-guides/faststore-api/get-started.md diff --git a/apps/docs/docs/reference/api/faststore-api.md b/apps/docs/docs/reference/api/faststore-api.md index 39b480d91d..70566b4ee1 100644 --- a/apps/docs/docs/reference/api/faststore-api.md +++ b/apps/docs/docs/reference/api/faststore-api.md @@ -56,7 +56,7 @@ You can use the GraphQL playground below to test and explore the FastStore API. } }"/> -You can also install the `@faststore/api` dependency in your project to start exploring the data layer by running a local server. Learn more in the [Get started guide](/reference/api/get-started). +You can also install the `@faststore/api` dependency in your project to start exploring the data layer by running a local server. Learn more in the [Get started guide](/how-to-guides/faststore-api/api/get-started). ## Going beyond From 07b7cd0fa9f70fdeb2ad691cdc8405716d65d6ee Mon Sep 17 00:00:00 2001 From: PedroAntunesCosta <47991446+PedroAntunesCosta@users.noreply.github.com> Date: Tue, 28 Jun 2022 17:21:33 -0300 Subject: [PATCH 06/12] Revert "moving the API `get-started.md` article to `how-to-guides`" This reverts commit 2dd2a9928dc6bcb372a8df7d8855199c794c5024. --- apps/docs/docs/reference/api/faststore-api.md | 2 +- .../faststore-api => reference/api}/get-started.md | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename apps/docs/docs/{how-to-guides/faststore-api => reference/api}/get-started.md (100%) diff --git a/apps/docs/docs/reference/api/faststore-api.md b/apps/docs/docs/reference/api/faststore-api.md index 70566b4ee1..39b480d91d 100644 --- a/apps/docs/docs/reference/api/faststore-api.md +++ b/apps/docs/docs/reference/api/faststore-api.md @@ -56,7 +56,7 @@ You can use the GraphQL playground below to test and explore the FastStore API. } }"/> -You can also install the `@faststore/api` dependency in your project to start exploring the data layer by running a local server. Learn more in the [Get started guide](/how-to-guides/faststore-api/api/get-started). +You can also install the `@faststore/api` dependency in your project to start exploring the data layer by running a local server. Learn more in the [Get started guide](/reference/api/get-started). ## Going beyond diff --git a/apps/docs/docs/how-to-guides/faststore-api/get-started.md b/apps/docs/docs/reference/api/get-started.md similarity index 100% rename from apps/docs/docs/how-to-guides/faststore-api/get-started.md rename to apps/docs/docs/reference/api/get-started.md From dafdd232553cb5d1d3c9d647607f3e81ae90df9b Mon Sep 17 00:00:00 2001 From: PedroAntunesCosta <47991446+PedroAntunesCosta@users.noreply.github.com> Date: Tue, 28 Jun 2022 17:25:15 -0300 Subject: [PATCH 07/12] Revert "Revert "moving the API `get-started.md` article to `how-to-guides`"" This reverts commit 07b7cd0fa9f70fdeb2ad691cdc8405716d65d6ee. --- .../api => how-to-guides/faststore-api}/get-started.md | 0 apps/docs/docs/reference/api/faststore-api.md | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename apps/docs/docs/{reference/api => how-to-guides/faststore-api}/get-started.md (100%) diff --git a/apps/docs/docs/reference/api/get-started.md b/apps/docs/docs/how-to-guides/faststore-api/get-started.md similarity index 100% rename from apps/docs/docs/reference/api/get-started.md rename to apps/docs/docs/how-to-guides/faststore-api/get-started.md diff --git a/apps/docs/docs/reference/api/faststore-api.md b/apps/docs/docs/reference/api/faststore-api.md index 39b480d91d..70566b4ee1 100644 --- a/apps/docs/docs/reference/api/faststore-api.md +++ b/apps/docs/docs/reference/api/faststore-api.md @@ -56,7 +56,7 @@ You can use the GraphQL playground below to test and explore the FastStore API. } }"/> -You can also install the `@faststore/api` dependency in your project to start exploring the data layer by running a local server. Learn more in the [Get started guide](/reference/api/get-started). +You can also install the `@faststore/api` dependency in your project to start exploring the data layer by running a local server. Learn more in the [Get started guide](/how-to-guides/faststore-api/api/get-started). ## Going beyond From d3a0307391a8f3ab88e8c6cbfa30b4215ba57a50 Mon Sep 17 00:00:00 2001 From: PedroAntunesCosta <47991446+PedroAntunesCosta@users.noreply.github.com> Date: Tue, 28 Jun 2022 17:26:09 -0300 Subject: [PATCH 08/12] Update get-started.md --- apps/docs/docs/how-to-guides/faststore-api/get-started.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/apps/docs/docs/how-to-guides/faststore-api/get-started.md b/apps/docs/docs/how-to-guides/faststore-api/get-started.md index 25432d3568..1ca1b5e844 100644 --- a/apps/docs/docs/how-to-guides/faststore-api/get-started.md +++ b/apps/docs/docs/how-to-guides/faststore-api/get-started.md @@ -1,8 +1,3 @@ ---- -description: Install the FastStore API and start building blazing fast ecommerce websites. -pagination_prev: null ---- - # Get started ## Install From a45ca3f3a4b297b6294c9ac9b0a3c3a4ca351239 Mon Sep 17 00:00:00 2001 From: PedroAntunesCosta <47991446+PedroAntunesCosta@users.noreply.github.com> Date: Mon, 25 Jul 2022 15:40:56 -0300 Subject: [PATCH 09/12] Gramarly --- apps/docs/docs/how-to-guides/faststore-api/get-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/docs/docs/how-to-guides/faststore-api/get-started.md b/apps/docs/docs/how-to-guides/faststore-api/get-started.md index 1ca1b5e844..888b9a08e1 100644 --- a/apps/docs/docs/how-to-guides/faststore-api/get-started.md +++ b/apps/docs/docs/how-to-guides/faststore-api/get-started.md @@ -10,7 +10,7 @@ yarn add @faststore/api ## Usage -Explore the GraphQL data layer by running a local server of your FastStore project in your machine. +Explore the GraphQL data layer by running a local server of your FastStore project on your machine. 1. Open the terminal and change to your FastStore project directory. 2. Install dependencies using yarn (`yarn install`), From 941d8b2eff7063185455e1a258c23e36573172fd Mon Sep 17 00:00:00 2001 From: PedroAntunesCosta <47991446+PedroAntunesCosta@users.noreply.github.com> Date: Mon, 25 Jul 2022 15:43:49 -0300 Subject: [PATCH 10/12] Update faststore-api.md --- apps/docs/docs/reference/api/faststore-api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/docs/docs/reference/api/faststore-api.md b/apps/docs/docs/reference/api/faststore-api.md index 70566b4ee1..b2add70328 100644 --- a/apps/docs/docs/reference/api/faststore-api.md +++ b/apps/docs/docs/reference/api/faststore-api.md @@ -20,7 +20,7 @@ Also, thanks to a type-safe **GraphQL** protocol, the FastStore API allows devel ![FastStore API usage architecture](https://vtexhelp.vtexassets.com/assets/docs/src/faststoreAPI2___58c4a9c4d23539900ef8b1cce9769288.png) -:::tip +:::info To learn more about GraphQL and its main concepts, visit the official [GraphQL website](https://graphql.org/). ::: From f97755eb11398cede0bccfb30cc8062c7f0c765d Mon Sep 17 00:00:00 2001 From: PedroAntunesCosta <47991446+PedroAntunesCosta@users.noreply.github.com> Date: Mon, 25 Jul 2022 15:49:14 -0300 Subject: [PATCH 11/12] trying to trade files' folders --- .../{how-to-guides/faststore-api => reference/api}/get-started.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename apps/docs/docs/{how-to-guides/faststore-api => reference/api}/get-started.md (100%) diff --git a/apps/docs/docs/how-to-guides/faststore-api/get-started.md b/apps/docs/docs/reference/api/get-started.md similarity index 100% rename from apps/docs/docs/how-to-guides/faststore-api/get-started.md rename to apps/docs/docs/reference/api/get-started.md From a4279afad3d67e527bafb24ed6ecbb9692a75598 Mon Sep 17 00:00:00 2001 From: PedroAntunesCosta <47991446+PedroAntunesCosta@users.noreply.github.com> Date: Mon, 25 Jul 2022 17:43:42 -0300 Subject: [PATCH 12/12] Update faststore-api.md --- apps/docs/docs/reference/api/faststore-api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/docs/docs/reference/api/faststore-api.md b/apps/docs/docs/reference/api/faststore-api.md index b2add70328..5e96152520 100644 --- a/apps/docs/docs/reference/api/faststore-api.md +++ b/apps/docs/docs/reference/api/faststore-api.md @@ -56,7 +56,7 @@ You can use the GraphQL playground below to test and explore the FastStore API. } }"/> -You can also install the `@faststore/api` dependency in your project to start exploring the data layer by running a local server. Learn more in the [Get started guide](/how-to-guides/faststore-api/api/get-started). +You can also install the `@faststore/api` dependency in your project to start exploring the data layer by running a local server. Learn more in the [Get started guide](/references/api/get-started). ## Going beyond