- git clone
- yarn
- yarn start
- http://localhost:3000/graphql로 접속
id 값을 넘겨주고, 필요한 필드값을 입력하면 됩니다.
{
getGqlMember(id: "e877dbd0472163d7f268") {
id
name
part
}
}
처음에 아무것도 들어있지 않아서 멤버 추가를 먼저 해줘야 조회가 가능
mutation {
addGqlMember(newInput : {
name: "soryeongk"
part: WEB
}) {
id
}
}
patch가 아닌 put으로 작동.. 하나만 변경되더라도 정보를 다 넣어줘야함,, id와 함께 변경될 새로운 정보를 전달해주면 업데이트 해줌
mutation {
updateGqlMember(id: "d8eb4b78220d8b857d6d" modified : {
name: "soryeongk"
part: SERVER
}) {
id
name
part
}
}
id를 전달해주면 해당 내용 삭제됨 삭제 성공 여부와 관련없이 잘 삭제되었다는 메시지가 나오는데, 확인하려면 query 한 번 더 요청해야함
mutation {
deleteX(id: "d8eb4b78220d8b857d6d")
}