{"action":"created","issue":{"url":"https://api.github.com/repos/robrichard/graphql-fields/issues/7","repository_url":"https://api.github.com/repos/robrichard/graphql-fields","labels_url":"https://api.github.com/repos/robrichard/graphql-fields/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/robrichard/graphql-fields/issues/7/comments","events_url":"https://api.github.com/repos/robrichard/graphql-fields/issues/7/events","html_url":"https://github.com/robrichard/graphql-fields/issues/7","id":330271976,"node_id":"MDU6SXNzdWUzMzAyNzE5NzY=","number":7,"title":"Compiled module breaks IE11","user":{"login":"Cottin","id":4736419,"node_id":"MDQ6VXNlcjQ3MzY0MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/4736419?v=4","gravatar_id":"","url":"https://api.github.com/users/Cottin","html_url":"https://github.com/Cottin","followers_url":"https://api.github.com/users/Cottin/followers","following_url":"https://api.github.com/users/Cottin/following{/other_user}","gists_url":"https://api.github.com/users/Cottin/gists{/gist_id}","starred_url":"https://api.github.com/users/Cottin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cottin/subscriptions","organizations_url":"https://api.github.com/users/Cottin/orgs","repos_url":"https://api.github.com/users/Cottin/repos","events_url":"https://api.github.com/users/Cottin/events{/privacy}","received_events_url":"https://api.github.com/users/Cottin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-07T13:27:36Z","updated_at":"2018-06-29T11:16:56Z","closed_at":null,"author_association":"NONE","body":"Maybe not what `graphql-fields` was intended for, but I'm using it client-side to do some custom automised caching logic on top of apollo.\r\n\r\npackage.json:\r\n```\r\n  \"dependencies\": {\r\n    \"graphql-fields\": \"^1.0.2\",\r\n\r\n```\r\n\r\n.babelrc:\r\n```\r\n{\r\n  \"presets\": [\r\n    [\"env\", {\r\n      \"targets\": {\r\n        \"browsers\": [\"last 2 versions\"]\r\n      },\r\n```\r\n=> [IE11 and IE10 should be supported by jun 2018](http://browserl.ist/?q=last+2+versions)\r\n\r\nnode_modules/graphql-fields/index.js contains for instance an arrow function here:\r\n```\r\nreturn fields.reduce((o, ast) => {\r\n            return flattenAST(ast, info, o);\r\n```\r\n...which gets inserted into bundle.js when using webpack and causes IE11 to break with a nice \"Syntax error\".\r\n\r\nI don't know if you want to support this by compiling graqhql-fields to es5 but I just spent some time debugging this to figure out why a project didn't work in IE so I just thought I'd mention it ;)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/robrichard/graphql-fields/issues/comments/401325039","html_url":"https://github.com/robrichard/graphql-fields/issues/7#issuecomment-401325039","issue_url":"https://api.github.com/repos/robrichard/graphql-fields/issues/7","id":401325039,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTMyNTAzOQ==","user":{"login":"nico29","id":3858041,"node_id":"MDQ6VXNlcjM4NTgwNDE=","avatar_url":"https://avatars2.githubusercontent.com/u/3858041?v=4","gravatar_id":"","url":"https://api.github.com/users/nico29","html_url":"https://github.com/nico29","followers_url":"https://api.github.com/users/nico29/followers","following_url":"https://api.github.com/users/nico29/following{/other_user}","gists_url":"https://api.github.com/users/nico29/gists{/gist_id}","starred_url":"https://api.github.com/users/nico29/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nico29/subscriptions","organizations_url":"https://api.github.com/users/nico29/orgs","repos_url":"https://api.github.com/users/nico29/repos","events_url":"https://api.github.com/users/nico29/events{/privacy}","received_events_url":"https://api.github.com/users/nico29/received_events","type":"User","site_admin":false},"created_at":"2018-06-29T11:16:56Z","updated_at":"2018-06-29T11:16:56Z","author_association":"NONE","body":"Hello. Thank you for this module. On IE11 the arrow function will not be the only issue, since IE11 does not support `Object.assign`. @robrichard would you be okay w/ a prepublish task running babel w/ present env as @Cottin suggests and also [this transform](https://www.npmjs.com/package/babel-plugin-transform-object-assign) to tackle the `assign` thing ?"}}
{"actor":{"display_login":"nico29"}}