{"action":"created","issue":{"url":"https://api.github.com/repos/calebmer/postgraphql/issues/299","repository_url":"https://api.github.com/repos/calebmer/postgraphql","labels_url":"https://api.github.com/repos/calebmer/postgraphql/issues/299/labels{/name}","comments_url":"https://api.github.com/repos/calebmer/postgraphql/issues/299/comments","events_url":"https://api.github.com/repos/calebmer/postgraphql/issues/299/events","html_url":"https://github.com/calebmer/postgraphql/issues/299","id":199012376,"number":299,"title":"Accessing HTTP request data from PostgreSQL","user":{"login":"jinty","id":553369,"avatar_url":"https://avatars1.githubusercontent.com/u/553369?v=3","gravatar_id":"","url":"https://api.github.com/users/jinty","html_url":"https://github.com/jinty","followers_url":"https://api.github.com/users/jinty/followers","following_url":"https://api.github.com/users/jinty/following{/other_user}","gists_url":"https://api.github.com/users/jinty/gists{/gist_id}","starred_url":"https://api.github.com/users/jinty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jinty/subscriptions","organizations_url":"https://api.github.com/users/jinty/orgs","repos_url":"https://api.github.com/users/jinty/repos","events_url":"https://api.github.com/users/jinty/events{/privacy}","received_events_url":"https://api.github.com/users/jinty/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":22,"created_at":"2017-01-05T17:26:38Z","updated_at":"2017-03-02T09:01:29Z","closed_at":null,"body":"More of a question than anything else.\r\n\r\nI'm writing an application which needs an audit log of changes,\r\nI would like to implement that using triggers but I need to record\r\ninfo from the HTTP request like the IP address of the client.\r\n\r\nIs there any built-in way of doing that? Can I write some kind of plugin to pass additional data to postgresql (i.e. in addition to the JWT data)?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/calebmer/postgraphql/issues/comments/283595840","html_url":"https://github.com/calebmer/postgraphql/issues/299#issuecomment-283595840","issue_url":"https://api.github.com/repos/calebmer/postgraphql/issues/299","id":283595840,"user":{"login":"benjie","id":129910,"avatar_url":"https://avatars1.githubusercontent.com/u/129910?v=3","gravatar_id":"","url":"https://api.github.com/users/benjie","html_url":"https://github.com/benjie","followers_url":"https://api.github.com/users/benjie/followers","following_url":"https://api.github.com/users/benjie/following{/other_user}","gists_url":"https://api.github.com/users/benjie/gists{/gist_id}","starred_url":"https://api.github.com/users/benjie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjie/subscriptions","organizations_url":"https://api.github.com/users/benjie/orgs","repos_url":"https://api.github.com/users/benjie/repos","events_url":"https://api.github.com/users/benjie/events{/privacy}","received_events_url":"https://api.github.com/users/benjie/received_events","type":"User","site_admin":false},"created_at":"2017-03-02T09:01:29Z","updated_at":"2017-03-02T09:01:29Z","body":"A hack to accomplish that would be modifying the JWT that's passed through, then reading it off of the `jwt.claim` namespace. But yes, there should be a better way (you can acheive it with `withPostGraphQLContext` by intercepting the pgClient instance and running the `select set_config(..., true)` yourself, but that involves taking over the entire HTTP handling yourself)."}}
{"actor":{"display_login":"benjie"}}