[React] AWS 튜토리얼에서의 오류

AWS API와 상호 작용하는 프론트엔드 코드 작성 오류

AWS 튜토리얼에서의 오류


오류가 있는 부분


AWS 공부하고 있는데 모듈 4 코드를 다 쳤는데,
오탈자 확인도 했는데,
npm start가 안 먹어서 오류 메시지를 검색했더니
(오류 메시지 : ‘createNote’ is not exported from ‘./graphql/mutations’ (imported as ‘createNoteMutation’) 아래 스택오버플로우와 같은 답변이 나왔다.
공식문서인데… 믿었는데 공식문서….


//공식문서 리액트 코드 

import { listNotes } from './graphql/queries';
import { createNote as createNoteMutation, deleteNote as deleteNoteMutation } from './graphql/mutations'


🔽🔽🔽

//스택오버플로우 보고 수정한 리액트 코드

import { listTodos as listNotes } from './graphql/queries';
import { createTodo as createNoteMutation, deleteTodo as deleteNoteMutation } from './graphql/mutations';



참고한 스택오버플로우



Made with by Álvaro