Last active
December 14, 2021 13:25
-
-
Save jaunesarmiento/f7903a80d5b0874a4b1aef7aad3e4e2a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
useEffect(() => { | |
API | |
.graphql(graphqlOperation(messagesByChannelID, { | |
channelID: '1', | |
sortDirection: 'ASC' | |
})) | |
.then((response) => { | |
const items = response?.data?.messagesByChannelID?.items; | |
if (items) { | |
setMessages(items); | |
} | |
}) | |
}, []); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
But!
import { messagesByChannelId } from './graphql/queries';
returns
import { messagesByChannelID } from './graphql/queries';
returnes
Is it right or wrong?