Skip to content

Commit d0cfc3b

Browse files
committed
source JWT_PG_TYPE_IDENTIFIER as env variable
1 parent bf2437d commit d0cfc3b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.env.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export POSTGRES_DB="forum_example_postgraphile"
44
export DATABASE_SCHEMAS="forum_example"
55
export DATABASE_URL="postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@localhost:5432/${POSTGRES_DB}"
66
export JWT_SECRET="2c045e2eb2ec46488530"
7+
export JWT_PG_TYPE_IDENTIFIER="forum_example.jwt_token"
78

89
export AWS_SERVICE_NAME="my-postgraphile-lambda"
910
export AWS_REGION="us-east-1"

src/postgraphileOptions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ exports.options = {
88
// If consuming JWT:
99
jwtSecret: process.env.JWT_SECRET || String(Math.random()),
1010
// If generating JWT:
11-
jwtPgTypeIdentifier: 'forum_example.jwt_token',
11+
jwtPgTypeIdentifier: process.env.JWT_PG_TYPE_IDENTIFIER,
1212

1313
/* If you want to enable GraphiQL, you must use `externalUrlBase` so PostGraphile
1414
* knows where to tell the browser to find the assets. Doing this is

0 commit comments

Comments
 (0)