Method | 설명 |
---|---|
GET | 서버에서 리소스 받음 |
POST | 서버에 리소스를 보냄 (create or append 리소스) |
PUT | 서버에 리소스를 PUT (create or overwrite 리소스) |
PATCH | 서버에 있는 존재하는 리소스의 값을 변경함 |
DELETE | - |
// A GraphQL Query
{
query{ // Operation type : mutation, subscription ...
user{ // Operation EndPoitn
name // Request Field
age
}
}
}
보통 Node Express 앱과 데이터 베이스 서버를 따로 나둔다. (API + SPA)
이 경우 Node API가 들어오는 requests를 처리하고
React SPA가 분리된 static host로 부터 처리됨