Skip to content

Commit

Permalink
fix: import listTodos from queries instead of mutations
Browse files Browse the repository at this point in the history
  • Loading branch information
erinleigh90 committed Dec 5, 2023
1 parent 35a6152 commit 677a71f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/fragments/lib/troubleshooting/common/upgrading.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -873,11 +873,11 @@ class MyClass {
Hub.listen('auth', (data) => {
const { payload } = data;
this.onAuthEvent(payload);
console.log('A new auth event has happened: ', data.payload.data.username + ' has ' + data.payload.event);
console.log('A new auth event has happened: ', data.payload.data.username + ' has ' + data.payload.event);
})
}
onAuthEvent(payload) {
onAuthEvent(payload) {
// ... your implementation
}
}
Expand Down Expand Up @@ -919,11 +919,11 @@ class MyClass {
Hub.listen('auth', (data) => {
const { payload } = data;
this.onAuthEvent(payload);
console.log('A new auth event has happened: ', data.payload.data.username + ' has ' + data.payload.event);
console.log('A new auth event has happened: ', data.payload.data.username + ' has ' + data.payload.event);
})
}
onAuthEvent(payload) {
onAuthEvent(payload) {
// ... your implementation
}
}
Expand Down Expand Up @@ -982,7 +982,7 @@ const getServerSideProps = async ({ req }) => {
```js
import { createServerRunner } from '@aws-amplify/adapter-nextjs';
import { generateServerClientUsingReqRes } from '@aws-amplify/adapter-nextjs/api';
import { listTodos } from './graphql/mutations';
import { listTodos } from './graphql/queries';
import amplifyConfig from './amplifyconfiguration.json';
const { runWithAmplifyServerContext } = createServerRunner({
Expand Down

0 comments on commit 677a71f

Please sign in to comment.