GraphQL

Apollo ServerとNowで作るGraphQLモックサーバ #4 モニタリング編

前回の続き。 nomusiclife.hatenablog.jp 作成したGraphQLサーバをモニタリング可能な状態にする。 Apollo Engine Apollo Engine | The GraphQL Gateway with essential features like caching and performance tracing. GraphQL caching Query execution tr…

Apollo ServerとNowで作るGraphQLモックサーバ #3 デプロイ編

前回の続き nomusiclife.hatenablog.jp ZEIT Nowにデプロイする Deploying Node.js Apps - ZEIT Documentation 詳しい方法は公式ドキュメントに譲るとして... 一般的なnode appは特に設定をしなくてもプロジェクトディレクトリで now コマンドを実行すればデ…

Apollo ServerとNowで作るGraphQLモックサーバ #2 実装編

モックサーバの実装 前回 nomusiclife.hatenablog.jp 1. 型の定義を行う import { ApolloServer, gql } from 'apollo-server' const typeDefs = gql` type Person { id: ID name: String phone: String } type Query { people: [Person] } ` const mocks = {…

Apollo ServerとNowで作るGraphQLモックサーバ #1 準備編

GraphQLのモックサーバを作る際に使うものをメモ 使うもの TypeScript ts-node, ts-node-dev apollo-server, apollo-engine Zeit Now TypeScript 型があったほうが書きやすい 最近はクライアント(React)も全てTypeScriptで書いてるし... apollo-serverのパッ…