GraphQL lus nug yog dab tsi?
GraphQL lus nug yog dab tsi?

Video: GraphQL lus nug yog dab tsi?

Video: GraphQL lus nug yog dab tsi?
Video: HACKING GraphQL FOR BEGINNERS + GIVEAWAY (closed) 2024, Kaum ib hlis
Anonim

A GraphQL lus nug yog siv los nyeem lossis nqa cov txiaj ntsig thaum kev hloov pauv yog siv los sau lossis tshaj tawm qhov txiaj ntsig. Nyob rau hauv ob qho tib si, kev ua haujlwm yog ib txoj hlua yooj yim uas a GraphQL server tuaj yeem txheeb xyuas thiab teb nrog cov ntaub ntawv hauv ib hom ntawv tshwj xeeb. GraphQL cov lus nug pab kom txo tau cov ntaub ntawv.

Raws li, GraphQL yog dab tsi?

GraphQL yog ib qho syntax uas piav qhia txog yuav ua li cas thov cov ntaub ntawv, thiab feem ntau yog siv los thauj cov ntaub ntawv los ntawm server mus rau tus neeg siv khoom. Nws cia tus neeg siv khoom qhia raws nraim dab tsi cov ntaub ntawv nws xav tau. Nws ua rau nws yooj yim dua los sau cov ntaub ntawv los ntawm ntau qhov chaw. Nws siv hom system los piav qhia cov ntaub ntawv.

Ib sab saum toj, dab tsi yog hom hauv GraphQL? Basic Hom . Cov GraphQL schema lus txhawb cov scalar hom ntawm String, Int, Float, Boolean, thiab ID, yog li koj tuaj yeem siv cov no ncaj qha rau hauv cov schema koj dhau los tsimSchema. Raws li lub neej ntawd, txhua hom yog nullable - nws yog qhov raug cai rov qab null raws li ib qho ntawm cov scalar hom.

Raws li, cov lus nug thiab kev hloov pauv hauv GraphQL yog dab tsi?

GraphQL - Kev hloov pauv . Hloov cov lus nug hloov kho cov ntaub ntawv hauv cov ntaub ntawv khaws cia thiab xa rov qab tus 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.

GraphQL zoo rau dab tsi?

Tsuas tso tseg, GraphQL yog ib hom lus nug uas tso cai rau koj sau cov lus nug uas siv cov qauv khoom es tsis yog kab ntawv. Qhov no yog zoo heev . Graph QL muab txoj hauv kev yooj yim tshaj tawm rau koj los khaws cov ntaub ntawv. Kuv xav tias qhov txiaj ntsig tseem ceeb ntawm kev siv GraphQL tau hloov txoj kev koj xa thiab retrieve cov ntaub ntawv.

Pom zoo: