Cov txheej txheem:

Apollo GraphQL server yog dab tsi?
Apollo GraphQL server yog dab tsi?

Video: Apollo GraphQL server yog dab tsi?

Video: Apollo GraphQL server yog dab tsi?
Video: Create A GraphQL API with Apollo Server V3 and MongoDB Atlas 2024, Kaum ib hlis
Anonim

Apollo Server yog qhov hloov tau yooj yim, kev txhawb nqa hauv zej zog, npaj tsim HTTP GraphQL Middleware rau Express, Hapi, Koa, thiab lwm yam. Apollo Server yog ib lub tsev qiv ntawv uas pab koj txuas a GraphQL schema rau HTTP server hauv Node.

Yog li ntawd, GraphQL server yog dab tsi?

GraphQL yog ib hom lus nug tsim los ntawm Facebook hauv 2012 uas muab ib qho kev sib txuas ntawm tus neeg siv khoom thiab cov server rau kev nqa cov ntaub ntawv thiab manipulation. Cov neeg thov rau ntau yam ntaub ntawv los ntawm cov GraphQL server ntawm cov lus nug. Piv txwv li, tus neeg siv khoom tuaj yeem thov cov peev txheej txuas nrog yam tsis tau txhais cov ntsiab lus tshiab API.

Tsis tas li, koj puas xav tau Apollo rau GraphQL? Tab sis GraphQL tsuas yog lus nug xwb. Thiab txhawm rau siv nws yooj yim, peb xav tau siv lub platform uas yuav ua tag nrho cov nqa hnyav rau peb. Ib lub platform zoo li no yog muab los ntawm Apollo . Cov Apollo platform yog kev siv ntawm GraphQL uas tuaj yeem hloov cov ntaub ntawv ntawm huab (server) mus rau UI ntawm koj lub app.

Ib yam li ntawd, kuv yuav pib Apollo server li cas?

Pib nrog Apollo Server

  1. Kauj ruam 1: Tsim ib qhov project tshiab.
  2. Kauj ruam 2: Nruab qhov kev vam meej.
  3. Kauj Ruam 3: Txhais koj qhov GraphQL schema.
  4. Kauj ruam 4: Txhais koj cov ntaub ntawv teev.
  5. Kauj Ruam 5: Txhais tus neeg daws teeb meem.
  6. Kauj ruam 6: Tsim ib qho piv txwv ntawm ApolloServer.
  7. Kauj ruam 7: Pib lub server.
  8. Kauj ruam 8: Ua koj thawj cov lus nug.

Puas yog GraphQL frontend lossis backend?

A GraphQL rov qab muaj ib tug schema uas txhais cov teb thiab hu muaj nyob rau txhua hom ntaub ntawv. GraphQL ua kom tsim tau ib lub thaub qab thiab integrate nws nrog cov pem hauv ntej nrog ntau tsawg kev cai kav dej ntau dua li ua ntej thiab hloov pauv sai nrog tsawg ntshai ntawm kev tawg yam khoom.

Pom zoo: