API
User
친구

User API

친구관계 API

친구 서비스는 게임 내에서 다른 사용자와 친구를 맺고 소셜 네트워크를 형성하는 데 사용됩니다.

내 친구 목록 조회

사용자의 친구 목록을 조회합니다. 페이지네이션, 정렬, 필터링 옵션을 제공합니다.

Operation

query MyFriendConnection($first: Int, $offset: Int, $orderBy: FriendConnectionOrderBy, $filter: FriendConnectionFilter) {
  myFriendConnection(first: $first, offset: $offset, orderBy: $orderBy, filter: $filter) {
    nodes {
      id
      nickname
      thumbnailUrl
    }
    totalCount
  }
}

Variables

{
  "first": 10,
  "offset": 0,
  "orderBy": {
    "field": "CREATED_AT",
    "direction": "DESC"
  },
  "filter": {
    "keyword": "친구 이름"
  }
}

추천 친구 목록 조회 (크레버스 재원생)

크레버스 재원생을 대상으로 한 추천 친구 목록을 조회합니다. 별도의 입력 변수는 필요하지 않습니다.

Operation

query RecommendFriends {
  recommendFriends {
    profiles {
      id
      nickname
      thumbnailUrl
    }
  }
}

내가 받은 친구 요청 목록 조회

사용자가 받은 친구 요청 목록을 조회합니다. 페이지네이션, 정렬, 필터링 옵션을 제공합니다.

Operation

query ReceivedFriendRequestConnection($first: Int, $offset: Int, $orderBy: FriendConnectionOrderBy, $filter: FriendConnectionFilter) {
  receivedFriendRequestConnection(first: $first, offset: $offset, orderBy: $orderBy, filter: $filter) {
    nodes {
      id
      nickname
      thumbnailUrl
    }
    totalCount
  }
}

Variables

{
  "first": 10,
  "offset": 0
}

내가 보낸 친구 요청 목록 조회

사용자가 보낸 친구 요청 목록을 조회합니다. 페이지네이션, 정렬, 필터링 옵션을 제공합니다.

Operation

query SentFriendRequestConnection($first: Int, $offset: Int, $orderBy: FriendConnectionOrderBy, $filter: FriendConnectionFilter) {
  sentFriendRequestConnection(first: $first, offset: $offset, orderBy: $orderBy, filter: $filter) {
    nodes {
      id
      nickname
      thumbnailUrl
    }
    totalCount
  }
}

Variables

{
  "first": 10,
  "offset": 0
}

친구 요청

사용자가 다른 사용자에게 친구 요청을 보냅니다.

Operation

mutation SendFriendRequest($input: SendFriendRequestInput!) {
  sendFriendRequest(input: $input) {
    success
  }
}

Variables

{
  "input": {
    "userNo": "요청 받을 사용자의 유저 번호"
  }
}

친구 요청 취소

사용자가 보낸 친구 요청을 취소합니다.

Operation

mutation CancelFriendRequest($input: CancelFriendRequestInput!) {
  cancelFriendRequest(input: $input) {
    success
  }
}

Variables

{
  "input": {
    "userNo": "요청 취소할 사용자의 유저 번호"
  }
}

친구 요청 수락

사용자가 받은 친구 요청을 수락합니다.

Operation

mutation AcceptFriendRequest($input: AcceptFriendRequestInput!) {
  acceptFriendRequest(input: $input) {
    success
  }
}

Variables

{
  "input": {
    "userNo": "요청을 수락할 사용자의 유저 번호"
  }
}

친구 요청 거절

사용자가 받은 친구 요청을 거절합니다.

Operation

mutation RejectFriendRequest($input: RejectFriendRequestInput!) {
  rejectFriendRequest(input: $input) {
    success
  }
}

Variables

{
  "input": {
    "userNo": "요청을 거절할 사용자의 유저 번호"
  }
}

친구 끊기

사용자가 친구 관계를 끊습니다.

Operation

mutation UnFriend($input: UnFriendInput!) {
  unFriend(input: $input) {
    success
  }
}

Variables

{
  "input": {
    "userNo": "친구 관계를 끊을 사용자의 유저 번호"
  }
}