Internal error when hitting endpoint

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
aws, javascript, postgresql, webpack

調査の方向性

postgraphileOptions.js と CloudWatch のスタックトレースから始め、特にバンドルされた bindings、libpq モジュール、pg-native モジュールを確認します。手動で設定した Lambda リクエストを再現し、ネイティブ PostgreSQL 依存関係がなぜ undefined 値を受け取るのかを特定します。gateway エンドポイントがこの内部エラーなしで応答すれば完了です。

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

説明

I'm trying to get a manually-configured Lambda up using this example. When I hit the gateway API endpoint, I get this error in the CloudWatch logs:

 "TypeError: Cannot read property 'indexOf' of undefined",
        "    at Function.getFileName (webpack:///./node_modules/bindings/bindings.js?:178:16)",
        "    at bindings (webpack:///./node_modules/bindings/bindings.js?:82:48)",
        "    at Object.eval (webpack:///./node_modules/libpq/index.js?:1:147)",
        "    at eval (webpack:///./node_modules/libpq/index.js?:361:30)",
        "    at Object../node_modules/libpq/index.js (/var/task/index.js:3785:1)",
        "    at __webpack_require__ (/var/task/index.js:20:30)",
        "    at eval (webpack:///./node_modules/pg-native/index.js?:1:13)",
        "    at Object../node_modules/pg-native/index.js (/var/task/index.js:5848:1)",
        "    at __webpack_require__ (/var/task/index.js:20:30)",
        "    at eval (webpack:///./node_modules/pg/lib/native/client.js?:11:14)"

My postgraphileOptions.js are as follows:

exports.options = {
  dynamicJson: true,
  cors: true,
  graphiql: false,
  graphqlRoute: '/graphql',
  externalUrlBase: `/${process.env.AWS_STAGE}`,

  // If consuming JWT:
 // jwtSecret: process.env.JWT_SECRET || String(Math.random()),
  // If generating JWT:
  //jwtPgTypeIdentifier: process.env.JWT_PG_TYPE_IDENTIFIER,

  /* If you want to enable GraphiQL, you must use `externalUrlBase` so PostGraphile
   * knows where to tell the browser to find the assets.  Doing this is
   * strongly discouraged, you should use an external GraphQL client instead.

    graphiql: true,
    enhanceGraphiql: true,
    graphqlRoute: '/',
    graphiqlRoute: '/graphiql',
  */
};

I'd appreciate any help anyone could give.

主要言語
PLpgSQL
スター
144
フォーク
19
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

graphile/postgraphile-lambda-example のほかの issue

graphile/postgraphile-lambda-example の issue をすべて見る

似ている issue

Backend & API Design の issue をもっと見る

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

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