graphile / graphile/gatsby-source-pg

Connecting to Heroku

Open
#23 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
35
Forks
14
PR merge metrics
No merged PRs in 30d

Description

### Summary

I'd like to connect to a Postgres instance running in Heroku.

### Additional context

I use Heroku's DATABASE_URL environment variable, with the suffix `?ssl=1` in my `connectionString`. When I run `gatsby develop` I get this error:

```
[client] success onPreBootstrap - 0.015s
[client] success createSchemaCustomization - 0.006s
[client]
[client] ERROR #11321 PLUGIN
[client]
[client] "gatsby-source-pg" threw an error while running the sourceNodes lifecycle:
[client]
[client] self signed certificate
[client]
[client]
[client]
[client] Error: self signed certificate
[client]
[client] - From previous event:
[client]
[client] - api-runner-node.js:460 Promise.catch.decorateEvent.pluginName
[client] [yl]/[gatsby]/src/utils/api-runner-node.js:460:9
[client]
[client] - From previous event:
[client]
[client] - api-runner-node.js:459
[client] [yl]/[gatsby]/src/utils/api-runner-node.js:459:14
[client]
[client] - timers.js:456 processImmediate
[client] internal/timers.js:456:21
[client]
[client] - From previous event:
[client]
[client] - api-runner-node.js:451
[client] [yl]/[gatsby]/src/utils/api-runner-node.js:451:13
[client]
[client] - From previous event:
[client]
[client] - api-runner-node.js:367 module.exports
[client] [yl]/[gatsby]/src/utils/api-runner-node.js:367:3
[client]
[client] - source-nodes.ts:97 _default
[client] [yl]/[gatsby]/src/utils/source-nodes.ts:97:9
[client]
[client] - source-nodes.ts:24 sourceNodes
[client] [yl]/[gatsby]/src/services/source-nodes.ts:24:9
[client]
[client] - interpreter.js:707 Interpreter.exec
[client] [yl]/[xstate]/lib/interpreter.js:707:27
[client]
[client] - interpreter.js:210 Interpreter.execute
[client] [yl]/[xstate]/lib/interpreter.js:210:22
[client]
[client] - interpreter.js:230 Interpreter.update
[client] [yl]/[xstate]/lib/interpreter.js:230:18
[client]
[client] - interpreter.js:131
[client] [yl]/[xstate]/lib/interpreter.js:131:23
[client]
[client] - scheduler.js:60 Scheduler.process
[client] [yl]/[xstate]/lib/scheduler.js:60:13
[client]
[client] - scheduler.js:44 Scheduler.schedule
[client] [yl]/[xstate]/lib/scheduler.js:44:14
[client]
[client] - interpreter.js:127 Interpreter.send
[client] [yl]/[xstate]/lib/interpreter.js:127:29
[client]
[client] - interpreter.js:825 actor.id
[client] [yl]/[xstate]/lib/interpreter.js:825:23
[client]
[client]
[client] warn The gatsby-source-pg plugin has generated no Gatsby nodes. Do you need it?
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing how the plugin handles the connectionString during the sourceNodes lifecycle, using the reported DATABASE_URL value with the ?ssl=1 suffix as the reproduction. Run gatsby develop against a Heroku Postgres instance and verify that the plugin connects without the reported self-signed certificate error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, postgresql
Domain
backend, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.