複数の時間を呼び出す方法
複数の時間を呼び出す方法
単一のAPI呼び出しで複数回同じgraphql質問を使用する方法.増幅する
単一のAPI呼び出しで複数回同じgraphql質問を使用する方法.増幅する
const response = await Promise.all(
signupData.educationalDetails.map(async (item) => {
console.log("item",item)
const variables = {
studentId: newTodo?.data?.createStudent?.id,
examPassed: item?.data?.boardType,
boardName: item?.data?.boardName,
passingYear: item?.data?.boardYear,
percentage: item?.data?.boardPercentage,
resumeUrl: item?.data?.boardFile
}
console.log("variables", variables)
try{
const newTodo2 = await API.graphql({ query: mutations.createEducational, variables: { input: variables } });
}catch(e){
console.log("####",e)
}
console.log('newTodo2Demo', { query: mutations.createEducational, variables: { input: variables } })
return{
boardName: item?.data?.boardName
}
// console.log('newTodo2Demo', newTodo2)
})
)
複数の時間を呼び出す方法を読んでいただきありがとうございますReference
この問題について(複数の時間を呼び出す方法), 我々は、より多くの情報をここで見つけました https://dev.to/ashishdonga/how-to-call-multiple-time-amplify-query-in-react-js-3n30テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol