Skip to content

graphql 쿼리 예시

Minwook Je edited this page Feb 1, 2021 · 14 revisions

Place

{
  getPlacesByKeyword(filters: {
    query: "제주도 라면"
    
  }){
    id
    place_name
    category_name
    category_group_code
    category_group_name
    phone
    address_name
    road_address_name
    place_url
    distance
    x
    y
  }
}

Sticker

mutation {
  createSticker(createStickerInput: {
    place_id: "201796840"
    place_name: "할망라면"
    x: 126.525700988171
    y: 33.241145974544
    sticker_category: "당도70"    
  }){
		
    sticker_category
    is_used
    spot(populate:true){
      _id
      place_id
      stickers(populate:false){
        _id
      }
      place_name
      category_name
      category_group_code
      category_group_name
      phone
      address_name
      road_address_name
      place_url
      distance
      x
      y
    }
  }
}

spot

{
  getAllSpots{
    _id
    place_id
    place_name
    stickers(populate:true) {
      _id
      is_used
      spot(populate:false) {
        _id
      }
    }
  }
}

{
  getSpotsByKeyword(keyword:"라면"){
    _id
    place_name
    category_name
    category_group_code
    category_group_name
    phone
    address_name
    road_address_name
    place_url
    distance
    x
    y
    stickers(populate:true){
     is_used 
    }
  }
}
mutation {
  removeSpot(id: "6001ee99ca1c83001503ffd9") {
    n
  }
}

Clone this wiki locally