File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -34,14 +34,16 @@ The CLI will display prompts to configure your schema and choose either GraphQL
34
34
Then access your API from your frontend code, for example, in a to-do list app that uses GraphQL:
35
35
36
36
``` javascript
37
- ` import` ` ` ` { ` ` API ` ` } ` ` ` ` from` ` ` ` 'aws-amplify'` ;
37
+ import { API } from ' aws-amplify' ;
38
38
import { listTodos } from ' ./graphql/queries' ;
39
39
40
- const result = await API .graphql (graphqlOperation (listTodos));
40
+ const result = await API .graphql ({
41
+ query: listTodos
42
+ );
41
43
console .log (result);
42
44
` ` `
43
45
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/)
45
47
46
48
### Authentication
47
49
You can’t perform that action at this time.
0 commit comments