Skip to content

Commit

Permalink
Docs/api overview (#1366)
Browse files Browse the repository at this point in the history
* New `Exploring the API` section

Also some minor corrections to the first part

* Minor corrections

* Adjusting content due to `get-started` guide

* Adding `going beyond`  section to FastStore API landing article

* moving the API `get-started.md` article to `how-to-guides`

* Revert "moving the API `get-started.md` article to `how-to-guides`"

This reverts commit 2dd2a99.

* Revert "Revert "moving the API `get-started.md` article to `how-to-guides`""

This reverts commit 07b7cd0.

* Update get-started.md

* Gramarly

* Update faststore-api.md

* trying to trade files' folders

* Update faststore-api.md
  • Loading branch information
PedroAntunesCosta authored Jul 25, 2022
1 parent 2d886f9 commit 91c0cd1
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 26 deletions.
48 changes: 28 additions & 20 deletions apps/docs/docs/reference/api/faststore-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,44 @@ 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)

:::tip
:::info
To learn more about GraphQL and its main concepts, visit the official [GraphQL website](https://graphql.org/).
:::

## Playground
## Key features

FastStore API is based on [**Schema.org**](https://schema.org/) and inspired by **clean architecture**.

### 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, as a result, to more clicks and interactions with your store's website.

### Flexible backend for frontend architecture

The FastStore API types and resolvers use a clean architecture to tackle specific ecommerce needs. The types specified in this schema are platform agnostic and may be used to build a wide range of custom frontend solutions. For instance:

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.

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.

<GraphQLExplorer query="query {
allProducts(first: 10) {
Expand All @@ -38,20 +56,10 @@ Use the GraphQL playground in the following to test and explore the FastStore AP
}
}"/>

## Key features

FastStore API is based on [**Schema.org**](https://schema.org/) and inspired by **clean architecture**.

### Improved brand's findability
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).

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.
## Going beyond

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.
With GraphQL, you can also [Extend the FastStore API schema](/how-to-guides/faststore-api/extending-the-faststore-api).

### Flexible backend for frontend architecture

The FastStore API types and resolvers use a clean architecture to tackle specific ecommerce needs. The types specified in this schema are platform agnostic and may be used to build a wide range of custom frontend solutions. For instance:

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.
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).
7 changes: 1 addition & 6 deletions apps/docs/docs/reference/api/get-started.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
---
description: Install the FastStore API and start building blazing fast ecommerce websites.
pagination_prev: null
---

# Get started

## Install
Expand All @@ -15,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`),
Expand Down

1 comment on commit 91c0cd1

@vercel
Copy link

@vercel vercel bot commented on 91c0cd1 Jul 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.