Internal error when hitting endpoint

Đang mở
#17 4 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
aws, javascript, postgresql, webpack
Lĩnh vực
backend, cloud, databases

Hướng nghiên cứu

Bắt đầu với postgraphileOptions.js và stack trace của CloudWatch, đặc biệt là các bindings được đóng gói cùng các module libpq và pg-native. Tái hiện request Lambda được cấu hình thủ công và xác định lý do dependency PostgreSQL native nhận một giá trị undefined; hoàn tất khi endpoint gateway phản hồi mà không có lỗi nội bộ này.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
PLpgSQL
Star
144
Fork
19
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của graphile/postgraphile-lambda-example

Tất cả issue của graphile/postgraphile-lambda-example

Issue tương tự

Thêm issue về Backend & API Design

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.