Skip to content
Merged
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
8 changes: 5 additions & 3 deletions src/pages/how-amplify-works.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,16 @@ The CLI will display prompts to configure your schema and choose either GraphQL
Then access your API from your frontend code, for example, in a to-do list app that uses GraphQL:

```javascript
`import`` ``{`` API ``}`` ``from`` ``'aws-amplify'`;
import { API } from 'aws-amplify';
import { listTodos } from './graphql/queries';

const result = await API.graphql(graphqlOperation(listTodos));
const result = await API.graphql({
query: listTodos
);
console.log(result);
```

Learn more about [Amplify data.](https://docs.amplify.aws/cli/graphql/overview/)
Learn more about [Amplify Data.](https://docs.amplify.aws/cli/graphql/overview/)

### Authentication

Expand Down