강의

멘토링

커뮤니티

Inflearn Community Q&A

hanzu9875142's profile image
hanzu9875142

asked

[Code Camp] A highly concentrated front-end course created at Bootcamp

section05. Q3 어떻게 접근하나요

Resolved

Written on

·

389

0

1번부터 난관이네요ㅜ

createBoard 생성하는데 무엇이 문제일까요?
오류는 boardAddress부분인것같습니다.

node.jsNext.jsgraphqlreactnext.jsseonodejs

Answer 3

1

안녕하세요 ju han 님!

데이터를 넘겨주는 부분은 잘 해주셨습니다.
다만, 요청이후 받아오는 값 중에 boardAddress 부분이 잘못되었습니다.
image요청이후 받아오는 return 타입 중 boardAddress는 객체죠?
그래서 적어주실때 객체 형태로 받아오도록 적어주셔야 합니다.
return 타입을 적어주는 부분에 아래 처럼 적어주세요!
boardAddress{ zipcode }

감사합니다.😁

1

ju han님의 프로필 이미지
ju han
Questioner

허걱 감사합니다ㅠ

1

받아오려는 데이터 중, boardAddress나 user는 하위항목이 있어야합니다.

mutation{
createBoard(createBoardInput:{
  writer:"writer"
  title:"t"
  contents:"c"
  password:"123"
}){
    boardAddress{address} // 하위항목, boardAddress만 쓸 수 없습니다.
    user{ _id  } // 하위항목, user만 쓸 수 없습니다.
   }
}
hanzu9875142's profile image
hanzu9875142

asked

Ask a question