'분류 전체보기'에 해당되는 글 83건

반응형

 

1. 우체국 
http://service.epost.go.kr/trace.RetrieveRegiPrclDeliv.postal?sid1=(13자리)
2. 대한통운 
http://www.doortodoor.co.kr/servlets/cmnChnnel?tc=dtd.cmn.command.c03condiCrg01Cmd&invc_no=(10자리)
3.한진택배 
http://www.hanjin.co.kr/Delivery_html/inquiry/result_waybill.jsp?wbl_num=(10, 12자리)
4. 로젠택배
http://www.ilogen.com/iLOGEN.Web.New/TRACE/TraceView.aspx?gubun=slipno&slipno=(11자리)
5. 현대택배
http://www.hlc.co.kr/hydex/jsp/tracking/trackingViewCus.jsp?InvNo={10,12자리}
6. KGB택배 
http://www.kgbls.co.kr/sub5/trace.asp?f_slipno=(10자리)
7. CJ GLS 
http://nexs.cjgls.com/web/service02_01.jsp?slipno=(12자리)
8. KG옐로우캡택배 
http://www.yellowcap.co.kr/custom/inquiry_result.asp?invoice_no=(11자리)
9. 우체국 EMS 
http://service.epost.go.kr/trace.RetrieveEmsTrace.postal?ems_gubun=E&POST_CODE=(13자리)
10. DHL
http://www.dhl.co.kr/publish/kr/ko/eshipping/track.high.html?pageToInclude=RESULTS&type=fasttrack&AWB=(10자리)
11. 한덱스
http://btob.sedex.co.kr/work/app/tm/tmtr01/tmtr01_s4.jsp?IC_INV_NO=1234567890 (10자리)
12. FedEx
http://www.fedex.com/Tracking?ascend_header=1&clienttype=dotcomreg&cntry_code=kr&language=korean&tracknumbers=123456789012 (12자리)
13. 동부익스프레스
http://www.dongbuexpress.co.kr/Html/Delivery/DeliveryCheckView.jsp?item_no=123456789012 (12자리)
14. 
UPS
http://www.ups.com/WebTracking/track?loc=ko_KR&InquiryNumber1=M1234567890 (최대 25자리)
15. 하나로택배
http://www.hanarologis.com/branch/chase/listbody.html?a_gb=center&a_cd=4&a_item=0&fr_slipno=1234567890 (최대 10자리)
16. 대신택배
http://home.daesinlogistics.co.kr/daesin/jsp/d_freight_chase/d_general_process2.jsp?1234567890123 (13자리)
17. 경동택배
http://www.kdexp.com/sub4_1.asp?stype=1&p_item=12345678901 (최대11자리)
18. 이노지스택배
http://www.innogis.net/trace02.asp?invoice=1234567890123 (최대13자리)
19. 일양로지스택배
http://www.ilyanglogis.com/functionality/tracking_result.asp?hawb_no=123456789 (9자리)
20. CVSnet 편의점택배
http://was.cvsnet.co.kr/src/ctod_status.jsp?invoice_no=1234567890 (10자리)
21. TNT Express
http://www.tnt.com/webtracker/tracking.do?respCountry=kr&respLang=ko&searchType=CON&cons=GE123456789WW (9,13자리)
22. HB한방택배
"http://www.hbtb.co.kr/search/s_search.asp?f_slipno=123456789012 (12자리)
23. GTX
http://www.gtx2010.co.kr/del_inquiry_result.html?s_gbn=1&awblno=123456789012 (12자리)


출처 : http://www.sitehis.com/spb3/sboard3/read.php?db=talk&cateuid=8&uid=296

택배배송조회 관련 정보를 가끔 수집하여 정리해보겠습니다.

네이버 조회 페이지
http://search.naver.com/search.naver?sm=tab_hty&where=nexearch&query=%C5%C3%B9%E8%B9%E8%BC%DB%C1%B6%C8%B8
택배회사종류대한통운택배 1588-1255 https://www.doortodoor.co.kr/
옐로우캡 1588-0123 http://www.yellowcap.co.kr/
로젠택배 1588-9988 http://www.ilogen.com/
동부익스프레스 1588-8848  http://www.dongbuexpress.co.kr/
우체국택배, 등기  1588-1300 http://www.epost.go.kr/
한진택배 1588-0011 http://hanex.hanjin.co.kr/
현대택배 1588-2121 http://www.hlc.co.kr/
KGB택배 1577-4577 http://www.kgbls.co.kr/
하나로 택배  1577-2828 http://www.hanarologis.com/
이노지스 택배  1566-4082 http://www.innogis.net/
CJ GLS택배 1588-5353 http://www.cjgls.co.kr/
대신택배  영업소별 전화접수  http://apps.ds3211.co.kr/
일양로지스 1588-0002 http://www.ilyanglogis.com/
경동택배  영업소별 전화접수  http://www.kdexp.com/
천일택배 영업소별 전화접수  http://www.cyber1001.co.kr/
편의점택배 1566-1025 http://was.cvsnet.co.kr/
GTX택배 1588-1756 http://www.gtx2010.co.kr/
국제택배 DHL KOREA 1588-0001 http://www.dhl.co.kr/
FedEx Express 080-023-8000 http://www.fedexkorea.co.kr/ 
 
대한통운
http://www.doortodoor.co.kr
배송조회페이지
https://www.doortodoor.co.kr/jsp/cmn/c03a_s1.jsp
GET방식
http://www.doortodoor.co.kr/servlets/cmnChnnel?tc=dtd.cmn.command.c03condiCrg01Cmd&invc_no=???

네이버의 javascript

 <script>
var dtd_companys = new Array();
dtd_companys["우체국택배"] = new Array(13, "http://service.epost.go.kr/trace.RetrieveRegiPrclDeliv.postal?sid1=","1234567890123 (13자리)","1588-1300","http://parcel.epost.go.kr");
dtd_companys["대한통운"] = new Array(10, "http://www.doortodoor.co.kr/servlets/cmnChnnel?tc=dtd.cmn.command.c03condiCrg01Cmd&invc_no=","1234567890 (10자리)", "1588-1255", "http://www.doortodoor.co.kr");
dtd_companys["한진택배"] = new Array(12, "http://www.hanjin.co.kr/Delivery_html/inquiry/result_waybill.jsp?wbl_num=", "1234567890 (10,12자리)", "1588-0011", "http://hanex.hanjin.co.kr");
dtd_companys["로젠택배"] = new Array(11, "http://www.ilogen.com/iLOGEN.Web.New/TRACE/TraceView.aspx?gubun=slipno&slipno=", "12345678901 (11자리)","1588-9988", "http://www.ilogen.com");
dtd_companys["현대택배"] = new Array(12, "http://www.hlc.co.kr/hydex/jsp/tracking/trackingViewCus.jsp?InvNo=", "1234567890 (10,12자리)", "1588-2121", "http://www.hlc.co.kr");
dtd_companys["KG옐로우캡택배"] = new Array(11, "http://www.yellowcap.co.kr/custom/inquiry_result.asp?invoice_no=", "12345678901 (11자리)", "1588-0123", "http://www.yellowcap.co.kr");
dtd_companys["KGB택배"] = new Array(10, "http://www.kgbls.co.kr/sub5/trace.asp?f_slipno=", "1234567890 (10자리)", "1577-4577", "http://www.kgbls.co.kr");
dtd_companys["EMS"] = new Array(13, "http://service.epost.go.kr/trace.RetrieveEmsTrace.postal?ems_gubun=E&POST_CODE=", "EE123456789KR (13자리)", "1588-1300", "http://service.epost.go.kr");
dtd_companys["DHL"] = new Array(0, "http://www.dhl.co.kr/publish/kr/ko/eshipping/track.high.html?pageToInclude=RESULTS&type=fasttrack&AWB=", "1234567890 (10자리)", "1588-0001", "http://www.dhl.co.kr");
dtd_companys["한덱스"] = new Array(10, "http://btob.sedex.co.kr/work/app/tm/tmtr01/tmtr01_s4.jsp?IC_INV_NO=", "1234567890 (10자리)", "1588-9040", "http://www.e-handex.co.kr");
dtd_companys["FedEx"] = new Array(12, "http://www.fedex.com/Tracking?ascend_header=1&clienttype=dotcomreg&cntry_code=kr&language=korean&tracknumbers=", "123456789012 (12자리)", "080-023-8000", "http://www.fedex.com/kr");
dtd_companys["동부익스프레스"] = new Array(12, "http://www.dongbuexpress.co.kr/Html/Delivery/DeliveryCheckView.jsp?item_no=", "123456789012 (12자리)", "1588-8848", "http://www.dongbuexpress.co.kr");
dtd_companys["CJ GLS"] = new Array(12, "http://nexs.cjgls.com/web/service02_01.jsp?slipno=", "123456789012 (12자리)", "1588-5353", "http://www.cjgls.co.kr");
dtd_companys["UPS"] = new Array(25, "http://www.ups.com/WebTracking/track?loc=ko_KR&InquiryNumber1=", "M1234567890 (최대 25자리)", "1588-6886", "http://www.ups.com/content/kr/ko/index.jsx" );
dtd_companys["하나로택배"] = new Array(10, "http://www.hanarologis.com/branch/chase/listbody.html?a_gb=center&a_cd=4&a_item=0&fr_slipno=", "1234567890 (최대 10자리)", "1577-2828", "http://www.hanarologis.com");
dtd_companys["대신택배"] = new Array(13, "http://home.daesinlogistics.co.kr/daesin/jsp/d_freight_chase/d_general_process2.jsp?", "1234567890123 (13자리)", "043-222-4582", "http://apps.ds3211.co.kr");
dtd_companys["경동택배"] = new Array(11, "http://www.kdexp.com/sub4_1.asp?stype=1&p_item=", "12345678901 (최대11자리)", "031-460-2400", "http://www.kdexp.com/");
dtd_companys["이노지스택배"] = new Array(13, "http://www.innogis.net/trace02.asp?invoice=", "1234567890123 (최대13자리)", "1566-4082", "http://www.innogis.net/");
dtd_companys["일양로지스택배"] = new Array(9, "http://www.ilyanglogis.com/functionality/tracking_result.asp?hawb_no=", "123456789 (9자리)", "1588-0002", "http://www.ilyanglogis.com/");
dtd_companys["CVSnet 편의점택배"] = new Array(10, "http://was.cvsnet.co.kr/src/ctod_status.jsp?invoice_no=", "1234567890 (10자리)", "1566-1025", "http://www.cvsnet.co.kr/");
dtd_companys["TNT Express"] = new Array(13, "http://www.tnt.com/webtracker/tracking.do?respCountry=kr&respLang=ko&searchType=CON&cons=", "GE123456789WW (9,13자리)", "1588-0588", "http://www.tnt.com/express/ko_kr/site/home.html");
dtd_companys["HB한방택배"] = new Array(12, "http://www.hbtb.co.kr/search/s_search.asp?f_slipno=", "123456789012 (12자리)", "1588-1059", "http://www.hbtb.co.kr/");
dtd_companys["GTX"] = new Array(12, "http://www.gtx2010.co.kr/del_inquiry_result.html?s_gbn=1&awblno=", "123456789012 (12자리)", "1588-1756", "http://www.gtx2010.co.kr");
var dtd_select_obj = document.getElementById("dtd_select");
var company = dtd_select_obj.options[dtd_select_obj.selectedIndex].value;
if(company == "" ) company = "우체국택배";
function doorToDoorSearch()
{
 var query_obj = document.getElementById('dtd_number_query');
 var query = query_obj.value;
 query = query.replace(' ', '');
 var url = "";
 
 /* 운송장 번호 값 확인 */
 if (company == "UPS") {
  var pattern1 = /^[0-9a-zA-Z]{9,12}$/i;
  var pattern2 = /^[0-9a-zA-Z]{18}$/i;
  var pattern3 = /^[0-9a-zA-Z]{25}$/i;
  if (query.search(pattern1) == -1 && query.search(pattern2) == -1 && query.search(pattern3) == -1) {
   alert(company+"의 운송장 번호 패턴에 맞지 않습니다.");
   query_obj.focus();
   return false;
  }
 } else if (company == "EMS") {
  var pattern = /^[a-zA-Z]{2}[0-9]{9}[a-zA-Z]{2}$/;
  if (query.search(pattern) == -1) {
   alert(company+"의 운송장 번호 패턴에 맞지 않습니다.");
   query_obj.focus();
   return false;
  }
 } else if (company == "한진택배" || company == "현대택배") {
  if (!isNumeric(query)) {
   alert("운송장 번호는 숫자만 입력해주세요.");
   query_obj.focus();
   return false;
  } else if ( query.length != 10 && query.length != 12 ) {
   alert(company+"의 운송장 번호는 10자리 또는 12자리의 숫자로 입력해주세요.");
   query_obj.focus();
   return false;
  }
 } else if (company == "경동택배") {
  if (!isNumeric(query)) {
   alert("운송장 번호는 숫자만 입력해주세요.");
   query_obj.focus();
   return false;
  } else if (query.length != 9 && query.length != 10 && query.length != 11) {
   alert(company+"의 운송장 번호는 9자리 또는 10자리 또는 11자리의 숫자로 입력해주세요.");
   query_obj.focus();
   return false;
  }
 } else if (company == "이노지스택배") {
  if (!isNumeric(query)) {
   alert("운송장 번호는 숫자만 입력해주세요.");
   query_obj.focus();
   return false;
  } else if (query.length > 13) {
   alert(company+"의 운송장 번호는 최대 13자리의 숫자로 입력해주세요.");
   query_obj.focus();
   return false;
  }
 } else if (company == "TNT Express") {
  var pattern1 = /^[a-zA-Z]{2}[0-9]{9}[a-zA-Z]{2}$/;
  var pattern2 = /^[0-9]{9}$/;
  if (query.search(pattern1) == -1 && query.search(pattern2) == -1) {
   alert(company+"의 운송장 번호 패턴에 맞지 않습니다.");
   query_obj.focus();
   return false;
  }
 } else {
  if (!isNumeric(query)) {
   alert("운송장 번호는 숫자만 입력해 주세요.");
   query_obj.focus();   
   return false;
  } else if (dtd_companys[company][0] > 0 && dtd_companys[company][0] != query.length) {
   alert(company+"의 운송장 번호는 "+dtd_companys[company][0]+"자리의 숫자로 입력해 주세요.");
   query_obj.focus();   
   return false;
  }
 }
 /* 링크만들기 */
 if (company == "대신택배") {
  url = dtd_companys[company][1];
  url+= "billno1="+query.substring(0,4);
  url+= "&billno2="+query.substring(4,7);
  url+= "&billno3="+query.substring(7,13);
 } else if (dtd_companys[company][1]) {
  url = dtd_companys[company][1]+query;
 }
 window.open(url,"_blank");
}
function isNumeric(s) {
 var count = 0;
 for (i = 0; i < s.length; i++) {
  if(s.charAt(i)<'0' || s.charAt(i)>'9') {
   count++;
  }
 }
 if(count > 0) {
  return 0;
 } else {
  return 1;
 }
}
function SetDeleveryContents(idx) {
 company = dtd_select_obj.options[idx].value;
 document.getElementById("Dcs01").innerHTML = dtd_companys[company][2];
 document.getElementById("Dcs02").innerHTML = company;
 document.getElementById("Dcs03").innerHTML = dtd_companys[company][3];
 document.getElementById("Dcs04").href  = dtd_companys[company][4];
 document.getElementById("Dcs04").target  = "_blank";
 
}
function checkValidDoor(query) {
 /* 운송장 번호 값 확인 */
 if (company == "UPS") {
  var pattern1 = /^1z[0-9]{16}$/i;
  var pattern2 = /^M[0-9]{10}$/;
  if (query.search(pattern1) == -1 && query.search(pattern2) == -1) {
   lert(company+"의 운송장 번호 패턴에 맞지 않습니다.");
   document.door_to_door_frm.dtd_number_query.focus();
   return false;
  }
 } else if (company == "EMS") {
  var pattern = /^[a-zA-z]{2}[0-9]{9}[a-zA-z]{2}$/;
  if (query.search(pattern) == -1) {
   alert(company+"의 운송장 번호 패턴에 맞지 않습니다.");
   document.door_to_door_frm.dtd_number_query.focus();
   return false;
  }
 } else if (company == "SC 로지스" || company == "한진택배" || company == "현대택배") {
  if (!isNumeric(query)) {
   alert("운송장 번호는 숫자만 입력해주세요.");
   document.door_to_door_frm.dtd_number_query.focus();
   return false;
  } else if ( query.length != 10 && query.length != 12 ) {
   alert(company+"의 운송장 번호는 10자리 또는 12자리의 숫자로 입력해주세요.");
   document.door_to_door_frm.dtd_number_query.focus();
   return false;
  }
 } else {
  if (!isNumeric(query)) {
   alert("운송장 번호는 숫자만 입력해 주세요.");
   document.door_to_door_frm.dtd_number_query.focus();   
   return false;
  } else if (dtd_companys[company][0] > 0 && dtd_companys[company][0] != query.length) {
   alert(company+"의 운송장 번호는 "+dtd_companys[company][0]+"자리의 숫자로 입력해 주세요.");
   document.door_to_door_frm.dtd_number_query.focus();   
   return false;
  } 
 }
}

</script>
<form name="door_to_door_frm" onSubmit="doorToDoorSearch();return false;">
  <select name="dtd_select" id="dtd_select" >
    <option value="경동택배" selected>경동택배</option>
    <option value="대신택배">대신택배</option>
    <option value="대한통운">대한통운</option>
    <option value="동부익스프레스">동부익스프레스</option>
    <option value="로젠택배">로젠택배</option>
    <option value="우체국택배">우체국택배</option>
    <option value="이노지스택배">이노지스택배</option>
    <option value="일양로지스택배">일양로지스택배</option>
    <option value="하나로택배">하나로택배</option>
    <option value="한덱스">한덱스</option>
    <option value="한진택배">한진택배</option>
    <option value="현대택배">현대택배</option>
    <option value="CJ GLS">CJ GLS</option>
    <option value="CVSnet 편의점택배">CVSnet 편의점택배</option>
    <option value="DHL">DHL</option>
    <option value="EMS">EMS</option>
    <option value="FedEx">FedEx</option>
    <option value="GTX">GTX</option>
    <option value="HB한방택배">HB한방택배</option>
    <option value="KG옐로우캡택배">KG옐로우캡택배</option>
    <option value="KGB택배">KGB택배</option>
    <option value="TNT Express">TNT Express</option>
    <option value="UPS">UPS</option>
  </select>
  <input type="text" style="width:201px;" class="input_off" name="dtd_number_query" id="dtd_number_query" value="'-'를 제외하고 입력하세요." onClick="this.value=''">
  <input type="submit" value="조회">
</form>

 

 

출처: 이분도 펌이긴 한데 원본URL을 기재해놓지 않으셔서 일단 펌글 URL을 기재합니다:
http://blog.naver.com/PostView.nhn?blogId=sjh7622&logNo=220689234596
반응형

'소소한팁' 카테고리의 다른 글

갤럭시 탭S3 펜 끊김 현상 (갤럭시 노트)  (0) 2019.06.08
[팁] 컴퓨터 자동종료 하는 법  (0) 2017.11.22
블로그 이미지

개발자_무형

,
반응형

# What is Introspection
Inspection is the ability to query details about the current API's schema.

```
query {
  __schema {    // introspection!
    types {
      name
      description
    }
  }
}
```

반응형

'개발 > 프론트엔드' 카테고리의 다른 글

Janus media server 설치하기  (4) 2020.03.17
Intel Open WebRTC Toolkit 클라이언트 삽질기  (0) 2020.03.13
7. GraphQL Subscription  (0) 2019.12.26
6. GraphQL Mutations  (0) 2019.12.26
5. GraphQL Interface  (0) 2019.12.26
블로그 이미지

개발자_무형

,
반응형

---

# What is Subscription
Subscription is used when the client wants real-time updates pushed from the server.

```
subscription
  liftStatusChange {
    name
    capacity
    status
  }
}
```

반응형

'개발 > 프론트엔드' 카테고리의 다른 글

Intel Open WebRTC Toolkit 클라이언트 삽질기  (0) 2020.03.13
8. GraphQL Introspection  (0) 2019.12.26
6. GraphQL Mutations  (0) 2019.12.26
5. GraphQL Interface  (0) 2019.12.26
4. GraphQL Union  (0) 2019.12.26
블로그 이미지

개발자_무형

,
반응형

# What is Mutation
*Query* describes all the read actions of data. However, Mutation performs data change.

Example:
```
mutation burnItDown {
  deleteAllData
}
```

Example:
```
mutation createSong {
  addSong(title: "No Scrubs", numberOne: true, performerName:"TLC"){
    id
    title
    numberOne
  }
}
```
addSong() adds data in parenthesis into the database.
following {} specifies which fields to retrieve if mutation returns an object.

반응형

'개발 > 프론트엔드' 카테고리의 다른 글

8. GraphQL Introspection  (0) 2019.12.26
7. GraphQL Subscription  (0) 2019.12.26
5. GraphQL Interface  (0) 2019.12.26
4. GraphQL Union  (0) 2019.12.26
3. GraphQL Fragments  (0) 2019.12.26
블로그 이미지

개발자_무형

,
반응형

What is an Interface

An Interface is an abstract type that specifies fields that should be implemented in similar object types. When another type implements the interface, it needs to include all the fields from the interface and may add its own fields. It acts like a virtual function in C++.

useful link: https://graphqlmastery.com/blog/graphql-interfaces-and-unions-how-to-design-graphql-schema

반응형

'개발 > 프론트엔드' 카테고리의 다른 글

7. GraphQL Subscription  (0) 2019.12.26
6. GraphQL Mutations  (0) 2019.12.26
4. GraphQL Union  (0) 2019.12.26
3. GraphQL Fragments  (0) 2019.12.26
2. GraphQL Query  (0) 2019.12.26
블로그 이미지

개발자_무형

,
반응형

If you want to return different types on different queries, you can use **union**.

```
union AgendaItem = StudyGroup | Workout
```

```
query schedule {
  agneda {
    ...on Workout {
      name
      reps
    }
    ...on StudyGroup {
      name
      subject
      students
    }
  }
}
```

```
...on Workout
```
is an inline fragment with the name "Workout"
you can also use named fragments (from previous post).

반응형

'개발 > 프론트엔드' 카테고리의 다른 글

6. GraphQL Mutations  (0) 2019.12.26
5. GraphQL Interface  (0) 2019.12.26
3. GraphQL Fragments  (0) 2019.12.26
2. GraphQL Query  (0) 2019.12.26
1. What is GraphQL  (0) 2019.12.26
블로그 이미지

개발자_무형

,
반응형


# Why do we need Fragments?
Fragments are used to reduce redundancy. You can think of it as something like struct in C.

For exmaple,

```
query {
  Lift(id: "jazz-cat") {
    name
    status
    capacity
    night
    elevationGain
    trailAccess {
      name
      difficulty
    }
}
  Trail(id: "river-run"){
    name
    difficulty
    accessedByLifts {
      name
      status
      capacity
      night
      elevationGain
    }
  }
}
```

you can see that Lift wants
  name
  status
  capacity
  night
  elevationGain
and Trail also wants those fields in "accessedByLifts"

In this case, you can use fragment

```
fragment liftInfo on Lift{
  name
  status
  capacity
  night
  elevationGain
}
```

fragment can be used with preceding 3 dots.
Following query returns exactly the same result as the upper code:

```
query {
  Lift(id: "jazz-cat") {
    ...liftInfo
    trailAccess {
      name
      difficulty
    }
}
  Trail(id: "river-run"){
    name
    difficulty
    accessedByLifts {
      ...liftInfo
    }
  }
}

fragment liftInfo on Lift{
  name
  status
  capacity
  night
  elevationGain
}
```

# Advantages
You can modify the selection sets used in many different queries simply by modifying one fragment.

반응형

'개발 > 프론트엔드' 카테고리의 다른 글

6. GraphQL Mutations  (0) 2019.12.26
5. GraphQL Interface  (0) 2019.12.26
4. GraphQL Union  (0) 2019.12.26
2. GraphQL Query  (0) 2019.12.26
1. What is GraphQL  (0) 2019.12.26
블로그 이미지

개발자_무형

,
반응형

Public GraphQL APIs:
SWAPI : http://graphql.org/swapi-graphql
GitHub API : https://developer.github.com/v4/explorer
Yelp : https://www.yelp.com/developer/graphql

below examples will be run on : http://snowtooth.moonhighway.com < visit the url and type in queries

You can add multiple queries to a query document but you can only run 1 query at a time.

for example,

# Try to write your query here
query lifts{
  allLifts{
    name
    status
  }
}

query trails{
  allTrails{
    name
    difficulty
  }
}

if you run the query document above, GraphQL playgound will ask you to choose one query to run.
To run both queries at once, you need to wrap them into 1 query.

query liftsAndTrails {     // query : root type. fields that are availabled will be in the documentation.
  liftCount(status: OPEN)  // liftCount : fields chosen from GraphQL documentation
  allLifts{                // allLifts : fields chosen from GraphQL documentation
    name
    status                 //selection sets
  }
  allTrails {
    name
    difficulty
  }
}

Specifying the return field name

query liftsAndTrails {
  open: liftCount(status: OPEN)
  chairlifts: allLifts {
    liftName : name  // Like this!
    status
  }
  skiSlopes: allTrails {
    name
    difficulty
  }
}

result is:

{
  "data": {
    "open": 0,
    "chairlifts": [
      {
        "liftName": "Astra Express", // name field has been returned with the name "liftName"
        "status": "CLOSED"
      }
    ],
    "skiSlopes": [
      {
        "name": "Blue Bird",   // if not specified, returned by the name of the query's field name
        "difficulty": "intermediate"
      },
    ]
  }
}

Using arguments to select data

query jazzCatStatus {
  Lift(id: "jazz-cat") { // argument
    name
    status
    night
    elevationGain
  }
}

Built-In GraphQL Scalar Types:

  1. Int
  2. Float
  3. String
  4. Boolean
  5. ID
반응형

'개발 > 프론트엔드' 카테고리의 다른 글

6. GraphQL Mutations  (0) 2019.12.26
5. GraphQL Interface  (0) 2019.12.26
4. GraphQL Union  (0) 2019.12.26
3. GraphQL Fragments  (0) 2019.12.26
1. What is GraphQL  (0) 2019.12.26
블로그 이미지

개발자_무형

,