GraphQL puas tuaj yeem hloov kho cov ntaub ntawv?
GraphQL puas tuaj yeem hloov kho cov ntaub ntawv?

Video: GraphQL puas tuaj yeem hloov kho cov ntaub ntawv?

Video: GraphQL puas tuaj yeem hloov kho cov ntaub ntawv?
Video: Improving webhook payloads by using GraphQL Subscription | M. Koryciński | GraphQL Wroclaw Meetup #9 2024, Hlis ntuj nqeg
Anonim

Hauv GraphQL , koj yuav tsum tsim kev hloov pauv los hloov kho server-sab cov ntaub ntawv , thiab kev siv sib txawv tuaj yeem txhawb nqa ib nrab tshiab.

Hauv qhov no, kev hloov pauv hauv GraphQL yog dab tsi?

GraphQL - Kev hloov pauv . Kev hloov pauv queries hloov cov ntaub ntawv nyob rau hauv cov ntaub ntawv khaws cia thiab xa ib tug nqi. Nws tuaj yeem siv los ntxig, hloov kho, lossis tshem tawm cov ntaub ntawv. Kev hloov pauv txhais tau tias yog ib feem ntawm lub schema.

Tsis tas li ntawd, yog GraphQL yav tom ntej? GraphQL Yog Tus Yav tom ntej . Qhov tseeb tias GraphQL yog ib qho lus nug qhib txhais tau hais tias cov zej zog tuaj yeem pab txhawb rau nws thiab txhim kho nws. Thaum Facebook tso tawm rau hauv zej zog, nws tau txais kev txhawb nqa thiab kev pom zoo los ntawm cov neeg tsim khoom.

Qhov thib ob, yog GraphQL database?

Tsis muaj. GraphQL feem ntau tsis meej pem nrog ua ib database tshuab. Qhov no yog ib tug misconception, GraphQL yog lus nug rau APIs - tsis yog databases . Hauv qhov kev nkag siab nws yog database agnostic thiab tuaj yeem siv nrog txhua yam database los yog tsis muaj database tag nrho.

Puas yog GraphQL siv

HTTP . GraphQL feem ntau yog ua haujlwm dhau HTTP ntawm ib qho kawg uas qhia txog tag nrho cov peev txheej ntawm kev pabcuam. Qhov no yog qhov sib piv rau REST APIs uas nthuav tawm cov suite ntawm URLs txhua qhov uas nthuav tawm ib qho peev txheej.

Pom zoo: