{"action":"created","issue":{"url":"https://api.github.com/repos/graphql/graphql-js/issues/402","repository_url":"https://api.github.com/repos/graphql/graphql-js","labels_url":"https://api.github.com/repos/graphql/graphql-js/issues/402/labels{/name}","comments_url":"https://api.github.com/repos/graphql/graphql-js/issues/402/comments","events_url":"https://api.github.com/repos/graphql/graphql-js/issues/402/events","html_url":"https://github.com/graphql/graphql-js/pull/402","id":159518467,"number":402,"title":"Logging support","user":{"login":"Slava","id":2608446,"avatar_url":"https://avatars.githubusercontent.com/u/2608446?v=3","gravatar_id":"","url":"https://api.github.com/users/Slava","html_url":"https://github.com/Slava","followers_url":"https://api.github.com/users/Slava/followers","following_url":"https://api.github.com/users/Slava/following{/other_user}","gists_url":"https://api.github.com/users/Slava/gists{/gist_id}","starred_url":"https://api.github.com/users/Slava/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Slava/subscriptions","organizations_url":"https://api.github.com/users/Slava/orgs","repos_url":"https://api.github.com/users/Slava/repos","events_url":"https://api.github.com/users/Slava/events{/privacy}","received_events_url":"https://api.github.com/users/Slava/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/graphql/graphql-js/labels/CLA%20Signed","name":"CLA Signed","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2016-06-09T22:01:16Z","updated_at":"2016-06-11T00:28:29Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/graphql/graphql-js/pulls/402","html_url":"https://github.com/graphql/graphql-js/pull/402","diff_url":"https://github.com/graphql/graphql-js/pull/402.diff","patch_url":"https://github.com/graphql/graphql-js/pull/402.patch"},"body":"This PR builds on top of #396 and provides a new option `logFn` that is called by GraphQL.js with the following events:\r\n\r\n- Resolver starts execution\r\n- Resolver finished execution\r\n- Resolver threw an error\r\n- Resolver's subtree starts execution (for a compound type)\r\n- Resolver's subtree finished execution\r\n- Resolver's subtree threw an error\r\n\r\nThis logging allows external users of the `graphql` module to tap into the execution time-line for profiling or logging/debugging.\r\n\r\nNote that this is not intended to be a logging system available from resolver's code. For that, we expect users of the library to pass their logging mechanism through the `context` property."},"comment":{"url":"https://api.github.com/repos/graphql/graphql-js/issues/comments/225325074","html_url":"https://github.com/graphql/graphql-js/pull/402#issuecomment-225325074","issue_url":"https://api.github.com/repos/graphql/graphql-js/issues/402","id":225325074,"user":{"login":"helfer","id":6569980,"avatar_url":"https://avatars.githubusercontent.com/u/6569980?v=3","gravatar_id":"","url":"https://api.github.com/users/helfer","html_url":"https://github.com/helfer","followers_url":"https://api.github.com/users/helfer/followers","following_url":"https://api.github.com/users/helfer/following{/other_user}","gists_url":"https://api.github.com/users/helfer/gists{/gist_id}","starred_url":"https://api.github.com/users/helfer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helfer/subscriptions","organizations_url":"https://api.github.com/users/helfer/orgs","repos_url":"https://api.github.com/users/helfer/repos","events_url":"https://api.github.com/users/helfer/events{/privacy}","received_events_url":"https://api.github.com/users/helfer/received_events","type":"User","site_admin":false},"created_at":"2016-06-11T00:28:29Z","updated_at":"2016-06-11T00:28:29Z","body":"@KyleAMathews There may be several requests processed concurrently at any given time, so I think the best way to do what you ask for is to create a new log function for every request, and generate the ID when you create that function. That's what I've been doing for tracing and timing executions in apollo server."}}
{"actor":{"display_login":"helfer"}}