本文へスキップ

Workers GraphQL Server

メンテナンス中
cloudflare/workers-graphql-server

Cloudflare Workers で動くグローバル分散型 Apollo GraphQL サーバーのテンプレート。型付きリゾルバー、Service Bindings、オプションの KV キャッシュに対応。

GitHub で見る
スター
793
フォーク
554
ウォッチ
793
未解決の Issue
3

この紹介文は現在英語版のみです。

Overview

workers-graphql-server is Cloudflare’s template for an Apollo GraphQL server on Cloudflare Workers. Whether your APIs run on-prem, in another cloud or on Cloudflare itself, it puts a globally distributed GraphQL layer in front of them.

Getting started

git clone https://github.com/cloudflare/workers-graphql-server
npm install
npm run dev

Configure wrangler.toml before deploying. The example resolvers call the PokeAPI, so a query like pokemon(id: 1) { name height weight } works right after deployment.

How it’s organized

  • Schema in src/schema.graphql; run npm run codegen after changes to regenerate the types in src/generated/graphql.ts.
  • Resolvers in src/resolvers.ts; they can use Service Bindings to call other Workers.
  • Options such as the base endpoint, the GraphQL sandbox, CORS and KV caching are set in graphQLOptions.

共通のカテゴリとタグで順位付けした、似たオープンソースプロジェクトです。

すべての SDK プロジェクト →