We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 15a46bc + 41ab24d commit d4360caCopy full SHA for d4360ca
2 files changed
graphql/server/src/middleware/graphile.ts
@@ -239,6 +239,10 @@ const buildPreset = (
239
...context,
240
};
241
242
+ if (req.token.session_id) {
243
+ pgSettings['jwt.claims.session_id'] = req.token.session_id;
244
+ }
245
+
246
// Propagate credential metadata as JWT claims so PG functions
247
// can read them via current_setting('jwt.claims.access_level') etc.
248
if (req.token.access_level) {
graphql/server/src/middleware/types.ts
@@ -3,6 +3,7 @@ import type { ApiStructure } from '../types';
3
export type ConstructiveAPIToken = {
4
id?: string;
5
user_id?: string;
6
+ session_id?: string;
7
access_level?: string;
8
kind?: string;
9
[key: string]: unknown;
0 commit comments