{"action":"opened","issue":{"url":"https://api.github.com/repos/graphql-compose/graphql-compose/issues/111","repository_url":"https://api.github.com/repos/graphql-compose/graphql-compose","labels_url":"https://api.github.com/repos/graphql-compose/graphql-compose/issues/111/labels{/name}","comments_url":"https://api.github.com/repos/graphql-compose/graphql-compose/issues/111/comments","events_url":"https://api.github.com/repos/graphql-compose/graphql-compose/issues/111/events","html_url":"https://github.com/graphql-compose/graphql-compose/issues/111","id":298567731,"number":111,"title":"graphql-js compatibility with versions <0.12","user":{"login":"yoadsn","id":1684709,"avatar_url":"https://avatars1.githubusercontent.com/u/1684709?v=4","gravatar_id":"","url":"https://api.github.com/users/yoadsn","html_url":"https://github.com/yoadsn","followers_url":"https://api.github.com/users/yoadsn/followers","following_url":"https://api.github.com/users/yoadsn/following{/other_user}","gists_url":"https://api.github.com/users/yoadsn/gists{/gist_id}","starred_url":"https://api.github.com/users/yoadsn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yoadsn/subscriptions","organizations_url":"https://api.github.com/users/yoadsn/orgs","repos_url":"https://api.github.com/users/yoadsn/repos","events_url":"https://api.github.com/users/yoadsn/events{/privacy}","received_events_url":"https://api.github.com/users/yoadsn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-20T11:57:43Z","updated_at":"2018-02-20T11:57:43Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"@nodkz I have upgraded some older project and noticed the new `graphql-compose` V3 is not compatible with graphql-js < V0.12.\r\n\r\nThe problem I stumbled upon was creating an enum value (Sort args within `graphql-compose-mongoose`).\r\nThis creation uses the new SchemaComposer method `getOrCreateETC`.\r\nThis method first creates an empty `EnumTypeComposer` (no fields) and then populates with fields. See [here](https://github.com/graphql-compose/graphql-compose/blob/06b70e2d56e7055b5a879f2d4dc286641b3f0d02/src/SchemaComposer.js#L139-L145).\r\nWhen creating a named empty `EnumTypeComposer` - internally it creates an empty `GraphQLEnumType`. see [here](https://github.com/graphql-compose/graphql-compose/blob/06b70e2d56e7055b5a879f2d4dc286641b3f0d02/src/EnumTypeComposer.js#L38-L41);\r\n\r\nUp until `graphql-js` V0.12 there was a check the makes sure field list is not empty. see [here](https://github.com/graphql/graphql-js/blob/e236ca23e26bff89de2e05cc95ba179d253662fd/src/type/definition.js#L1013-L1016);\r\nSince V0.12 - This check was apparently removed.\r\n\r\nSee a [working](https://codesandbox.io/s/l4179o78p7) vs [failing](https://codesandbox.io/s/6xom130l3n) reproduces based on `graphql-js` version difference alone.\r\n\r\nShould we implement a fix to support backward version? Update peer dependencies?"}}
{"actor":{"display_login":"yoadsn"}}