Issue with GraphQlAPI and Cognito Identity Pool

Issue with GraphQlAPI and Cognito Identity Pool


0

we’re trying to connect an Amplify Studio project to the Visual Studio Code Interface using the Amplify CLI and we run into the following problem when trying to fetch data. We’ve updated our code and configured the AWS as well.

The current error that we’re running into :

import { API, graphqlOperation } from 'aws-amplify';
import { listPreviousIssueArchives } from "./graphql/queries";

useEffect( () => {
fetchArticles()
},[])

// List all items
const fetchArticles = async () => {
const allPreviousIssueArchives = await API.graphql(graphqlOperation(listPreviousIssueArchives));
console.log(allPreviousIssueArchives);
setArticles(allPreviousIssueArchives.data.listPreviousIssueArchives)
}
[WARN] 04:18.17 GraphQLAPI - ensure credentials error No Cognito Identity pool provided for unauthenticated access
ConsoleLogger._log @ ConsoleLogger.js:134
InternalGraphQLAPI.ts:143 Uncaught (in promise) Error: No credentials
at InternalGraphQLAPIClass. (InternalGraphQLAPI.ts:143:1)
at step (tslib.es6.js1)
at Object.next (tslib.es6.js:81:1)
at fulfilled (tslib.es6.js:71:1)

We’ve looked at AWS Cognito Pool and we can’t find any issues or any way to "provide for unauthenticated access"

Trying to list all the information in the data model.


Load 5 more related questions


Show fewer related questions

0



Leave a Reply

Your email address will not be published. Required fields are marked *