Closed rngadam closed 6 years ago
:+1: I typically use the application_name
GUC to identify the "web app user" executing a query and/or the request id/correlation id if "end-to-end" logging is present (by issuing a SET
call prior to each query, which is required for security/RLS anyway).
This is possible (and easy to achieve) via pgSettings
; I'm going to close this for now.
https://www.graphile.org/postgraphile/usage-library/#pgsettings-function
When using postgresql logging, application_name is useful to differentiate where the query originates from (interactive clients (pgadmin) or applications).
For Postgraphql, at the moment, application_name is set to an empty string ''
As per https://github.com/brianc/node-postgres/wiki/Client
This seems to require a single change in postgraphql/cli.js:
better yet would be to add additional information (graphql vs graphiql)