graphile / crystal

🔮 Graphile's Crystal Monorepo; home to Grafast, PostGraphile, pg-introspection, pg-sql2 and much more!
https://graphile.org/
Other
12.58k stars 570 forks source link

Can not connect to Heroku instance #1649

Closed hadyrashwan closed 1 year ago

hadyrashwan commented 2 years ago

Summary

Steps to reproduce

When trying to connect to Heroku I get the following error.

A serious error occurred when building the initial schema. Exiting because `retryOnInitFail` is not set. Error details:

error: no pg_hba.conf entry for host "xx.xx.xx.xxx", user "xxxxxxx", database "xxxxxxx", no encryption
    at Parser.parseErrorMessage (/app/node_modules/pg-protocol/src/parser.ts:369:69)
    at Parser.handlePacket (/app/node_modules/pg-protocol/src/parser.ts:188:21)
    at Parser.parse (/app/node_modules/pg-protocol/src/parser.ts:103:30)
    at Socket.<anonymous> (/app/node_modules/pg-protocol/src/index.ts:7:48)
    at Socket.emit (node:events:537:28)
    at Socket.emit (node:domain:482:12)
    at addChunk (node:internal/streams/readable:324:12)
    at readableAddChunk (node:internal/streams/readable:297:9)
    at Socket.Readable.push (node:internal/streams/readable:234:10)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
    at TCP.callbackTrampoline (node:internal/async_hooks:130:17)

[nodemon] app crashed - waiting for file changes before starting...

Expected results

Connect and expose the graphl endpoint.

The App is running and not crashing

Actual results

App is crashing

Additional context

node version 18.5.0 Connecting to postgress version 14.4

My configuration is as follows

  const postgraphileOptions = {
    graphiql: true,
    enhanceGraphiql: true,
    appendPlugins: [ConnectionFilterPlugin],
  };

Possible Solution

It could be something wrong with my config not sure what it could be.

benjie commented 2 years ago

I suspect you'll get more timely help if you ask on the Discord: https://discord.gg/graphile

hadyrashwan commented 2 years ago

Will do that

benjie commented 1 year ago

[semi-automated message] Hi, there has been no activity in this issue for a while so I'm closing it to keep the issues/pull requests manageable. If this is still an issue, please re-open with additional details.