Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Mutation was defined in resolvers, but it's not an object

オープン
#553 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
aws, graphql, node.js, typescript
領域
api, backend, cloud

調査の方向性

aws-node-typescript-apollo-lambda の例をクローンし、README の環境設定に従って、npm run dev を実行し、http://localhost:3000/dev/graphql で失敗を再現します。例の resolver 設定を調査し、Mutation resolver がオブジェクトとして扱われるのを妨げているものを特定します。完了条件は、報告されたエラーなしで GraphQL Playground が読み込まれることです。

索引モデルが issue の本文から書いたものです。

説明

I've cloned the aws-node-typescript-apollo-lambda example and I cannot get the playground to work. I get the following error.

Error: Mutation was defined in resolvers, but it's not an object

To recreate the issue:

  1. clone the repo
  2. install deps
  3. follow steps for env variables in the README
  4. npm run dev
  5. visit graphql playground at http://localhost:3000/dev/graphql
  6. see console for error.

Here is the console output:

$ serverless offline --apiKey your-api-key-that-is-at-least-characters-long
Serverless: DOTENV: Loading environment variables from .env:
Serverless:      - APOLLO_LAMBDA_KEY
Serverless:      - NODE_ENV
Serverless: Compiling with Typescript...
Serverless: Using local tsconfig.json
Serverless: Typescript compiled.
Serverless: Watching typescript files...
offline: Starting Offline: dev/us-east-1.
offline: Offline [http for lambda] listening on http://localhost:3002

   ┌───────────────────────────────────────────────────────────────────────────┐
   │                                                                           │
   │   POST | http://localhost:3000/dev/graphql                                │
   │   POST | http://localhost:3000/2015-03-31/functions/graphql/invocations   │
   │   GET  | http://localhost:3000/dev/graphql                                │
   │   POST | http://localhost:3000/2015-03-31/functions/graphql/invocations   │
   │                                                                           │
   └───────────────────────────────────────────────────────────────────────────┘

offline: [HTTP] server ready: http://localhost:3000 🚀
offline: 
offline: Enter "rp" to replay the last request
Serverless: Compiling with Typescript...
Serverless: Typescript compiled.

offline: GET /dev/graphql (λ: graphql)
offline: (λ: graphql) RequestId: ckf1whi0h0002gzxg0ks9b6c9  Duration: 251.31 ms  Billed Duration: 300 ms

offline: POST /dev/graphql (λ: graphql)
offline: Failure: Mutation was defined in resolvers, but it's not an object
Error: Mutation was defined in resolvers, but it's not an object
主要言語
JavaScript
スター
11.5k
フォーク
4.4k
平均マージ
2時間 55分
マージ済み PR(30日)
3

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

serverless/examples のほかの issue

serverless/examples の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。