You can now create more GraphQL APIs using the OpenAPI connector with the newly added support for OAS 3.1.
OpenAPI is a standardized interface description for HTTP APIs, allowing easy discovery and interaction with services without accessing source code or extensive documentation. It simplifies calling a service by removing guesswork.
Grafbase can use this specification and the provided schema for your service to create an instant GraphQL API.
It's easy to get started using one of our existing OpenAPI templates or by adding your own to your project's configuration:
import { config, connector, graph } from '@grafbase/sdk'
const g = graph.Standalone()
const someService = connector.OpenAPI({
schema: g.env('SPEC_URL_HERE'),
headers: headers => {
headers.set('Authorization', forward: 'Authorization')
}
})
g.datasource(someService)
We'd love to hear your feedback and ideas, so join us on Discord.