{"action":"created","issue":{"url":"https://api.github.com/repos/stackshareio/graphql-cache/issues/65","repository_url":"https://api.github.com/repos/stackshareio/graphql-cache","labels_url":"https://api.github.com/repos/stackshareio/graphql-cache/issues/65/labels{/name}","comments_url":"https://api.github.com/repos/stackshareio/graphql-cache/issues/65/comments","events_url":"https://api.github.com/repos/stackshareio/graphql-cache/issues/65/events","html_url":"https://github.com/stackshareio/graphql-cache/pull/65","id":502755963,"node_id":"MDExOlB1bGxSZXF1ZXN0MzI0Nzc4MjAy","number":65,"title":"Make compatible with graphql batch","user":{"login":"vincedevendra","id":12373198,"node_id":"MDQ6VXNlcjEyMzczMTk4","avatar_url":"https://avatars2.githubusercontent.com/u/12373198?v=4","gravatar_id":"","url":"https://api.github.com/users/vincedevendra","html_url":"https://github.com/vincedevendra","followers_url":"https://api.github.com/users/vincedevendra/followers","following_url":"https://api.github.com/users/vincedevendra/following{/other_user}","gists_url":"https://api.github.com/users/vincedevendra/gists{/gist_id}","starred_url":"https://api.github.com/users/vincedevendra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vincedevendra/subscriptions","organizations_url":"https://api.github.com/users/vincedevendra/orgs","repos_url":"https://api.github.com/users/vincedevendra/repos","events_url":"https://api.github.com/users/vincedevendra/events{/privacy}","received_events_url":"https://api.github.com/users/vincedevendra/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2019-10-04T17:28:37Z","updated_at":"2019-10-22T20:49:21Z","closed_at":"2019-10-22T20:49:21Z","author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/stackshareio/graphql-cache/pulls/65","html_url":"https://github.com/stackshareio/graphql-cache/pull/65","diff_url":"https://github.com/stackshareio/graphql-cache/pull/65.diff","patch_url":"https://github.com/stackshareio/graphql-cache/pull/65.patch"},"body":"resolves #55 \r\n\r\nProblem\r\n-------\r\nWhen the same field returns a promise (as is the case if using `graphql-batch`), `graphl-cache` logs an error, `{\"error\":\"no _dump_data is defined for class Proc\"}`, and writes nothing to cache.\r\n\r\nCause (for defects/bugs)\r\n------------------------\r\n`graphl-cache` is attempting to write a promise to the cache, instead of waiting for the promise to resolve.\r\n\r\nSolution\r\n--------\r\nResolve any promises prior to writing to cache. `Deconstructor#perform` can detect promises and if it finds any, itself return a promise that resolves to the deconstructed value to be cached.  `Marshal#write` can then detect whether the `Deconstructor` handed it a promise, and cache its resolved value.\r\n\r\nNotes\r\n-----\r\n- I have some reservations about requiring `'promise'` in `spec_helper.rb`, because I'd like to be able to test that nothing blows up for those who don't have `Promise` defined. But I couldn't think of a better way."},"comment":{"url":"https://api.github.com/repos/stackshareio/graphql-cache/issues/comments/545148234","html_url":"https://github.com/stackshareio/graphql-cache/pull/65#issuecomment-545148234","issue_url":"https://api.github.com/repos/stackshareio/graphql-cache/issues/65","id":545148234,"node_id":"MDEyOklzc3VlQ29tbWVudDU0NTE0ODIzNA==","user":{"login":"thebadmonkeydev","id":6217672,"node_id":"MDQ6VXNlcjYyMTc2NzI=","avatar_url":"https://avatars1.githubusercontent.com/u/6217672?v=4","gravatar_id":"","url":"https://api.github.com/users/thebadmonkeydev","html_url":"https://github.com/thebadmonkeydev","followers_url":"https://api.github.com/users/thebadmonkeydev/followers","following_url":"https://api.github.com/users/thebadmonkeydev/following{/other_user}","gists_url":"https://api.github.com/users/thebadmonkeydev/gists{/gist_id}","starred_url":"https://api.github.com/users/thebadmonkeydev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thebadmonkeydev/subscriptions","organizations_url":"https://api.github.com/users/thebadmonkeydev/orgs","repos_url":"https://api.github.com/users/thebadmonkeydev/repos","events_url":"https://api.github.com/users/thebadmonkeydev/events{/privacy}","received_events_url":"https://api.github.com/users/thebadmonkeydev/received_events","type":"User","site_admin":false},"created_at":"2019-10-22T20:49:21Z","updated_at":"2019-10-22T20:49:21Z","author_association":"COLLABORATOR","body":"Closing and re-opening this PR to trigger a CI build."}}
{"actor":{"display_login":"thebadmonkeydev"}}