Skip to content

Commit

Permalink
Merge pull request #6186 from aws-amplify/renebrandel-patch-4
Browse files Browse the repository at this point in the history
Update how-amplify-works.mdx
  • Loading branch information
renebrandel authored Nov 3, 2023
2 parents 30a1796 + 16e343f commit 045eaa2
Showing 1 changed file with 5 additions and 3 deletions.
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

0 comments on commit 045eaa2

Please sign in to comment.