ไลบรารี Queries
ไลบรารี Queriesดึงข้อมูลพยากรณ์อากาศของสหรัฐฯ สำหรับสถานที่หนึ่ง

ดึงข้อมูลพยากรณ์อากาศของสหรัฐฯ สำหรับสถานที่หนึ่ง

query นี้เชื่อมต่อกับ API ของ US National Weather Service และดึงข้อมูลพยากรณ์อากาศสำหรับสถานที่ตามพิกัดที่กำหนด (ผ่านตัวแปร $lat และ $long)

query FetchUSWeatherDataForLocation(
  $lat: Float!
  $long: Float!
) {
  url: _sprintf(
    string: "https://api.weather.gov/points/%s,%s",
    values: [$lat, $long]
  )
  _sendJSONObjectItemHTTPRequest(input: {
    url: $__url
  })
}