graphql-binding-github开源项目

我要开发同款
匿名用户2021年11月23日
182阅读

技术信息

开源地址
https://gitee.com/MTrun/react-big-screen
授权协议
Readme

作品详情

GraphQLBidigforGitHub

EmbedGitHub'sGraphQLAPIitoyourserverapplicatio

DeprecatioNotice!

Ithelastfewmoths,sicethetrasitioofmaylibrariesuderTheGuild'sleadership,We'vereviewedadreleasedmayimprovemetsadversiostographql-cli,graphql-cofigadgraphql-import.

We'vereviewedgraphql-bidig,hadmaymeetigswithcurretusersadegagedthecommuityalsothroughtheroadmapissue.

Whatwe'vefoudisthattheewGraphQLMeshlibraryiscoverigotolyallthecurretcapabilitiesofGraphQLBidig,butalsothefutureideasthatwereitroduceditheorigialGraphQLBidigblogpostadhave'tcometolifeyet.

Adthebestthig-GraphQLMeshgivesyouallthosecapabilities,eveifyoursourceisotaGraphQLserviceatall!itcabeGraphQL,OpeAPI/Swagger,gRPC,SQLorayothersource!AdofcourseyoucaevemergeallthosesourcesitoasigleSDK.

JustlikeGraphQLBidig,yougetafullytypedSDK(thakstotheprotocolsSDKsadtheGraphQLCodeGeerator),butfromaysource,adthatSDKcaruaywhere,asacoectororasafullblowgateway.Adyoucashareyourow"MeshModules"(whichyouwouldprobablycall"yourowbidig")adourcommuityalreadycreatedmayofthose!Also,wedecidedtosimplyexposeregularGraphQL,soyoucachoosehowtocosumeitusigalltheawesomefluetclietSDKsoutthere.

Ifyouthikthatwe'vemissedaythigfromGraphQLBidigthatisotsupportediabetterwayiGraphQLMesh,pleaseletuskow!

Istallyaraddgraphql-bidig-githubExample(Demo)

Seeexampledirectoryforfullexampleapplicatio.

cost{GitHub}=require('graphql-bidig-github')cost{GraphQLServer}=require('graphql-yoga')cost{importSchema}=require('graphql-import')costfavoriteRepos=[{ower:'graphcool',ame:'graphql-yoga'},{ower:'graphql',ame:'graphql-js'},]costtoke='__ENTER_YOUR_GITHUB_TOKEN__'costgithub=ewGitHub(toke)costtypeDefs=importSchema('schemas/app.graphql')costresolvers={Query:{hello:(paret,{ame})=>`Hello${ame||'World'}!`,favoriteRepos:(paret,args,cotext,ifo)=>{returPromise.all(favoriteRepos.map(args=>github.query.repository(args,cotext,ifo)),)},},//thefollowigiseededtomakeiterfaces,uios&customscalarswork...github.getAbstractResolvers(typeDefs),}costserver=ewGraphQLServer({resolvers,typeDefs})server.start(()=>cosole.log('Serverruigohttps://localhost:4000'))HowtocreateaGitHubToke

SimplyfollowthisguideadheadovertothetokesettigsoGitHub.

ResourcesGithubGraphQLExplorer:https://developer.github.com/v4/explorer/

功能介绍

GraphQL Binding for GitHub Embed GitHub's GraphQL API into your server application Deprecation No...

声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论