GraphQL JS yog dab tsi?
GraphQL JS yog dab tsi?

Video: GraphQL JS yog dab tsi?

Video: GraphQL JS yog dab tsi?
Video: GraphQL Explained in 100 Seconds 2024, Tej zaum
Anonim

GraphQL . js yog lub tsev qiv ntawv lub hom phiaj dav dav thiab tuaj yeem siv tau ob qho tib si hauv Node server thiab hauv browser. Ua piv txwv, cov cuab yeej GraphiQL tau tsim nrog GraphQL . js ! Tsim ib qhov project siv GraphQL.

Tsis tas li ntawd, 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 yam li ntawd, GraphQL yog dab tsi hauv node JS? Tsim A GraphQL Server Nrog Node . js Thiab Express. GraphQL yog ib hom lus uas tso cai rau koj muab cov lus piav qhia ua tiav thiab nkag siab txog cov ntaub ntawv hauv koj li API. Tsis tas li ntawd nws muab lub zog rau cov neeg siv khoom los nug txog qhov lawv xav tau thiab tsis muaj dab tsi ntxiv. Qhov project lub vev xaib tuaj yeem pom ntawm ua graphql .org/.

Ib yam li ntawd, 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.

GraphQL puas yog lus programming?

GraphQL yog lus nug lus syntax, ib programming lus -agnostic execution engine, thiab ib tug tsis tu ncua evolving specification.

Pom zoo: