LoginSignup
3
1

About Fuse: GraphQL and BFF

Posted at

Fuse について。

GraphQL API のクライアントを生成できる Framework らしい。

BFF として、動かすこともできそう。例えば、Cloudflare や Container で。

認知度はまだまだ。

Star History Chart

Getting Started

  • 基本的に手順の通り。
npx create-fuse-app
npm install
npm install --save fuse graphql
npm install --save-dev @graphql-typed-document-node/core
npm i --save-dev @0no-co/graphqlsp
npx fuse dev
node ➜ /workspaces/fuse-dev (main) $ npx fuse dev
Server listening on http://localhost:4000/graphql

image

Define the schema

  • Fuse で定義した schema.graphqls を backend と schema を共有するケース。

Fix Types

  • 今回は簡単に field を追加する。

Run the Fuse API server

  • 起動する
node ➜ /workspaces/fuse-dev (main) $ npx fuse dev
Server listening on http://localhost:4000/graphql
  • schema が追加される

Fake function to fetch users. In real applications, this would talk to an underlying REST API/gRPC service/third-party API/…

ユーザーをフェッチするための偽の関数。実際のアプリケーションでは、これは基礎となるREST API/gRPCサービス/サードパーティAPI/...と話をするでしょう。

あとは、REST API を呼ぶなり、gRPC を呼ぶなり好きにしてくれと。

以上

BTW

プロスポーツ選手は多くが自己破産すると聞きます。アメフトや NBA など。

そんな中、ロビン・ファン・ペルシが良い父になっていたことに驚きを隠せません。

なぜなら、現役のプレースタイルや言動を見ていた者として、プレーはすごい。けど、性格は??という感じでした。

ロビン・ファン・ペルシ、ごめんなさい ⚽️

私もこんな父になりたい。

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1