Skip to content

Commit 045eaa2

Browse files
authored
Merge pull request #6186 from aws-amplify/renebrandel-patch-4
Update how-amplify-works.mdx
2 parents 30a1796 + 16e343f commit 045eaa2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/pages/how-amplify-works.mdx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,16 @@ The CLI will display prompts to configure your schema and choose either GraphQL
3434
Then access your API from your frontend code, for example, in a to-do list app that uses GraphQL:
3535

3636
```javascript
37-
`import`` ``{`` API ``}`` ``from`` ``'aws-amplify'`;
37+
import { API } from 'aws-amplify';
3838
import { listTodos } from './graphql/queries';
3939

40-
const result = await API.graphql(graphqlOperation(listTodos));
40+
const result = await API.graphql({
41+
query: listTodos
42+
);
4143
console.log(result);
4244
```
4345
44-
Learn more about [Amplify data.](https://docs.amplify.aws/cli/graphql/overview/)
46+
Learn more about [Amplify Data.](https://docs.amplify.aws/cli/graphql/overview/)
4547
4648
### Authentication
4749

0 commit comments

Comments
 (0)