Skip to content

Commit

Permalink
Merge branch 'aws-amplify:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
cshfang authored Apr 12, 2023
2 parents b7e7682 + f169e9b commit 966e82b
Show file tree
Hide file tree
Showing 35 changed files with 236 additions and 359 deletions.
6 changes: 6 additions & 0 deletions generatePathMap.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ function generatePathMap(
},
'/cli/function': {
page: '/cli/function'
},
'/flutter-references': {
page: '/flutter-references'
},
'/contribute': {
page: '/contribute'
}
},
removeChoosePages = false //this flag if set will generate a pathmap without the choose platform pages
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
"@algolia/autocomplete-shared": "^1.5.6",
"@algolia/autocomplete-theme-classic": "^1.6.1",
"@algolia/client-search": "^4.13.0",
"@aws-amplify/amplify-cli-core": "^4.0.1",
"@aws-amplify/amplify-cli-core": "^4.0.2",
"@aws-amplify/ui-components": "latest",
"@aws-amplify/ui-react": "^4.4.3",
"@aws-amplify/ui-react": "^4.6.0",
"@emotion/react": "^11.1.5",
"@emotion/styled": "^11.3.0",
"@mdx-js/mdx": "^2.0.0",
Expand Down Expand Up @@ -96,7 +96,8 @@
"loader-utils": "2.0.4",
"minimatch": "3.0.5",
"json5": "2.2.2",
"decode-uri-component": "0.2.1"
"decode-uri-component": "0.2.1",
"vm2": "3.9.15"
},
"jest": {
"preset": "ts-jest",
Expand Down
2 changes: 2 additions & 0 deletions src/components/contribute/QuickstartResources.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export default function QuickstartResources() {
<Flex wrap={'wrap'} justifyContent={'center'} width="100%" gap="2em">
<View width={{ base: '90%', large: '40%' }}>
<iframe
sandbox
width="600"
height="350"
src="https://www.youtube-nocookie.com/embed/8BUSqSkhqtw"
Expand All @@ -30,6 +31,7 @@ export default function QuickstartResources() {
</View>
<View width={{ base: '90%', large: '40%' }}>
<iframe
sandbox
width="600"
height="350"
src="https://www.youtube-nocookie.com/embed/WMKVE98hEzE"
Expand Down
20 changes: 5 additions & 15 deletions src/directory/directory.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -820,21 +820,6 @@ export const directory = {
}
]
},
xr: {
title: 'XR',
items: [
{
title: 'Getting started',
route: '/lib/xr/getting-started',
filters: ['js']
},
{
title: 'Scene API',
route: '/lib/xr/sceneapi',
filters: ['js']
}
]
},
utilities: {
title: 'Utilities',
items: [
Expand Down Expand Up @@ -1760,6 +1745,11 @@ export const directory = {
route: '/cli/graphql/schema-evolution',
filters: []
},
{
title: 'Directives reference',
route: '/cli/graphql/directives-reference',
filters: []
},
{
title: 'JavaScript, Java, Swift code generation',
route: '/cli/graphql/client-code-generation',
Expand Down
1 change: 1 addition & 0 deletions src/fragments/cli-config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ Successfully set up the new user.
Watch the video below to learn how to install and configure the Amplify CLI or skip to the next section to follow the step-by-step instructions.

<iframe
sandbox
src="https://www.youtube-nocookie.com/embed/fWbM5DLh25U"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
Expand Down
2 changes: 1 addition & 1 deletion src/fragments/guides/hosting/custom-domains.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
In this video you will learn how to configure a custom domain using the Amplify Console.

<iframe src="https://www.youtube-nocookie.com/embed/uaG2mMYLI68" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<iframe sandbox src="https://www.youtube-nocookie.com/embed/uaG2mMYLI68" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
2 changes: 1 addition & 1 deletion src/fragments/guides/hosting/nextjs.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
In this guide you'll learn how to deploy a [Next.js](https://nextjs.org/) app using Amplify Hosting. Amplify supports the hosting of static apps and apps with dynamic server-side rendered routes (SSR).

<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/eqoZrXulE8A" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<iframe sandbox width="560" height="315" src="https://www.youtube-nocookie.com/embed/eqoZrXulE8A" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

## Prerequisites

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
In this video you will learn how to configure password-protection for your Amplify web deployments using the Amplify Console.

<iframe src="https://www.youtube-nocookie.com/embed/QIxm9HPefT0" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<iframe sandbox src="https://www.youtube-nocookie.com/embed/QIxm9HPefT0" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
2 changes: 1 addition & 1 deletion src/fragments/guides/hosting/pull-request-previews.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
In this video you will learn how to enable Pull Request Previews using the Amplify Console.

<iframe src="https://www.youtube-nocookie.com/embed/NMln6UpcodE" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<iframe sandbox src="https://www.youtube-nocookie.com/embed/NMln6UpcodE" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Amplify DataStore provides a persistent on-device storage repository for you to

## How it Works

<iframe src="https://www.youtube-nocookie.com/embed/KcYl6_We0EU" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<iframe sandbox src="https://www.youtube-nocookie.com/embed/KcYl6_We0EU" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Amplify DataStore is an on device persistent repository for interacting with your local data while it synchronizes with the cloud. The core idea is to focus on your data modeling in your application with GraphQL, adding any authorization rules or business logic into your application when needed. This can be done using Amplify CLI project functionality (`amplify add auth` or `amplify add function`) as well as the [GraphQL Transformer](/cli/graphql/overview).

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
The Amplify Auth category persists authentication-related information to make it available to other Amplify categories and to your application.

<BlockSwitcher>

<Block name="Stable (Mobile)">
Expand Down
9 changes: 9 additions & 0 deletions src/fragments/lib/auth/js/hub_events/10_listen_events.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ const listener = (data) => {
case 'forgotPasswordSubmit_failure':
logger.error('password confirmation failed');
break;
case 'verify':
logger.info('TOTP token verification successful');
break;
case 'tokenRefresh':
logger.info('token refresh succeeded');
break;
Expand All @@ -68,6 +71,12 @@ const listener = (data) => {
case 'userDeleted':
logger.info('user deletion successful');
break;
case 'updateUserAttributes':
logger.info('user attributes update successful');
break;
case 'updateUserAttributes_failure':
logger.info('user attributes update failed');
break;
case 'signOut':
logger.info('user signed out');
break;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
The fastest way to get started is using the `amplify-app` npx script.

<iframe
sandbox
src="https://www.youtube-nocookie.com/embed/wH-UnQy1ltM"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
Expand Down
5 changes: 5 additions & 0 deletions src/fragments/lib/datastore/js/setup-env-js.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Next, install the Amplify library dependencies in your project by running:

```bash
npm install aws-amplify
```
2 changes: 1 addition & 1 deletion src/fragments/lib/datastore/native_common/how-it-works.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Amplify DataStore provides a persistent on-device storage repository for you to

## How it Works

<iframe src="https://www.youtube-nocookie.com/embed/KcYl6_We0EU" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<iframe sandbox src="https://www.youtube-nocookie.com/embed/KcYl6_We0EU" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Amplify DataStore is an on device persistent repository for interacting with your local data while it synchronizes with the cloud. The core idea is to focus on your data modeling in your application with GraphQL, adding any authorization rules or business logic into your application when needed. This can be done using Amplify CLI project functionality (`amplify add auth` or `amplify add function`) as well as the [GraphQL Transformer](/cli/graphql/overview).

Expand Down
4 changes: 4 additions & 0 deletions src/fragments/lib/datastore/native_common/setup-env.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ import all0 from '/src/fragments/lib/datastore/native_common/setup-env-cli.mdx';

<Fragments fragments={{ all: all0 }} />

import js2 from '/src/fragments/lib/datastore/js/setup-env-js.mdx';

<Fragments fragments={{ js: js2, "react-native": js2 }} />

import reactnative1 from '/src/fragments/lib/datastore/react-native/getting-started/polyfills.mdx';

<Fragments fragments={{ 'react-native': reactnative1 }} />
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The fastest way to get started is using the `amplify-app` npx script.

<iframe src="https://www.youtube-nocookie.com/embed/wH-UnQy1ltM" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<iframe sandbox src="https://www.youtube-nocookie.com/embed/wH-UnQy1ltM" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<br/>

<BlockSwitcher>
Expand Down Expand Up @@ -81,7 +81,7 @@ Then configure the SQLite storage adapter with DataStore in your app:

```js
import { DataStore } from 'aws-amplify';
import ExpoSQLiteAdapter from '@aws-amplify/datastore-storage-adapter/ExpoSQLiteAdapter';
import { ExpoSQLiteAdapter } from '@aws-amplify/datastore-storage-adapter/ExpoSQLiteAdapter';

DataStore.configure({
storageAdapter: ExpoSQLiteAdapter
Expand Down
3 changes: 2 additions & 1 deletion src/fragments/lib/graphqlapi/graphql-from-node.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ For functions written using CommonJS, you will need to install version 2 of `nod

## Query

Using an API Key for authenticating your requests, you can query the GraphQL API to get a list of all `Todo`s.
Using an API Key for authenticating your requests, you can query the GraphQL API to get a list of all `Todo`s. To paginate over the list queries, you need to pass in a `limit` and `nextToken` on the `listTodos` query. See more at [GraphQL pagination
](/guides/api-graphql/graphql-pagination).

<!-- prettier-ignore -->
```js
Expand Down
3 changes: 1 addition & 2 deletions src/fragments/lib/graphqlapi/js/authz.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ const createdTodo = await API.graphql<GraphQLQuery<CreateTodoMutation>>({
```

</Block>

<Block name="JavaScript">

```js
// ...

Expand Down Expand Up @@ -123,7 +123,6 @@ const createdTodo = await API.graphql<GraphQLQuery<CreateTodoMutation>>({
```

</Block>

<Block name="JavaScript">

```js
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ import flutter5 from "/src/fragments/lib/graphqlapi/flutter/advanced-workflows/3

<Fragments fragments={{flutter: flutter5}} />

## Combining Multiple Operations
## Combining multiple GraphQL operations in a single request

When you want to perform more than one operation in a single request, you can place them within the same document. For example, to retrieve a Post and a Todo
GraphQL allows you to run multiple GraphQL operations (queries/mutations) as part of a single network request from the client code. To perform multiple operations in a single request, you can place them within the same GraphQL document. For example, to retrieve a Post and a Todo:

import ios6 from "/src/fragments/lib/graphqlapi/ios/advanced-workflows/40_multiple.mdx";

Expand All @@ -148,6 +148,12 @@ import flutter7 from "/src/fragments/lib/graphqlapi/flutter/advanced-workflows/4

<Fragments fragments={{flutter: flutter7}} />

<Callout>

Combining multiple GraphQL requests on the client-side is different than server-side transaction support. To run multiple transactions as a batch operation refer to the [Batch Put Custom Resolver](/cli/graphql/examples-and-solutions/#batch-put-custom-resolver) example.

</Callout>

## Adding Headers to Outgoing Requests

By default, the API plugin includes appropriate authorization headers on your outgoing requests. However, you may have an advanced use case where you wish to send additional request headers to AppSync.
Expand Down
2 changes: 1 addition & 1 deletion src/fragments/lib/predictions/js/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ The Amplify CLI will set appropriate IAM policy for Roles in your Cognito Identi
"comprehend:DetectSyntax",
"comprehend:DetectKeyPhrases",
"rekognition:DetectFaces",
"rekognition:RecognizeCelebrities"
"rekognition:RecognizeCelebrities",
"rekognition:DetectLabels",
"rekognition:DetectModerationLabels",
"rekognition:DetectText",
Expand Down
115 changes: 0 additions & 115 deletions src/fragments/lib/xr/getting-started.mdx

This file was deleted.

Loading

0 comments on commit 966e82b

Please sign in to comment.