为什么要在GraphQL中使用Grafbase?

huangapple go评论70阅读模式
英文:

Why use Grafbase with Graphql?

问题

I ran into Grafbase being used with Graphql and now I am not sure what is the role of Grafbase in Graphql. I far as I know graphql is a query language that is used to create queries for fetching data avoiding overfetching and underfetching unlike REST API. but what role does Grafbase play here? is it a database like Mongodb which serves data using graphql api's?

我遇到了在GraphQL中使用Grafbase,现在我不确定Grafbase在GraphQL中的角色是什么。据我所知,GraphQL是一种查询语言,用于创建查询以获取数据,避免了REST API中的过度获取和不足获取。但是Grafbase在这里扮演什么角色呢?它是否像MongoDB一样,使用GraphQL API提供数据服务?

英文:

I ran into Grafbase being used with Graphql and now I am not sure what is the role of Grafbase in Graphql. I far as I know graphql is a query language that is used to create queries for fetching data avoiding overfetching and underfetching unlike REST API. but what role does Grafbase play here? is it a database like Mongodb which servers data using graphql api's?

答案1

得分: 2

Grafbase的Jamie在此 👋

Grafbase的目标是降低创建GraphQL API和统一数据源的复杂性。Grafbase可以自动从现有的GraphQL或OpenAPI规范生成GraphQL API。

您可以将Grafbase视为一个带有所有功能和特性的完全托管的GraphQL Yoga或Apollo Server,包括 缓存身份验证/权限分支预览 等等。

Grafbase目前拥有自己的轻量级数据库,但您可以使用解析器集成任何数据库。查看以下示例以帮助您入门:

为了使开发人员更容易使用其现有数据库,我们将很快引入本地数据库连接器。首个连接器是MongoDB;您可以在这里预览目前的外观。

我们最近更新了主页,其中包括一个配置生成器,可以让您更好地了解如何连接现有数据源、配置身份验证、无服务器搜索索引、缓存等等。

目前我们看到很多开发人员正在使用Grafbase来缓存和扩展现有的GraphQL或OpenAPI,详细了解请点击这里

英文:

Jamie from Grafbase here 👋

Grafbase aims to reduce the complexity around creating GraphQL APIs and unifying data sources. Grafbase automatically generates GraphQL APIs from an existing GraphQL or OpenAPI spec too.

You can think of Grafbase as a fully managed GraphQL Yoga or Apollo Server but with all of the bells and whistles, including caching, auth/permissions, branch previews and more.

Grafbase currently has its own lightweight database, but you can integrate any database using resolvers. See a few of these examples to get you going:

To make the experience even more significant for developers wanting to use their existing database, we will soon introduce native database connectors.

The first is MongoDB; you can get a sneak peek of what this looks like currently here.

We recently updated the homepage that includes a config builder which should give you a better idea of how to connect existing data sources, configure auth, serverless search index, caching and more.

The thing we see a lot of developers using Grafbase for currently is to cache and extend existing GraphQL or OpenAPIs — learn more.

huangapple
  • 本文由 发表于 2023年7月18日 04:36:38
  • 转载请务必保留本文链接:https://go.coder-hub.com/76707915.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定