{"action":"closed","issue":{"url":"https://api.github.com/repos/apollographql/apollo-android/issues/1582","repository_url":"https://api.github.com/repos/apollographql/apollo-android","labels_url":"https://api.github.com/repos/apollographql/apollo-android/issues/1582/labels{/name}","comments_url":"https://api.github.com/repos/apollographql/apollo-android/issues/1582/comments","events_url":"https://api.github.com/repos/apollographql/apollo-android/issues/1582/events","html_url":"https://github.com/apollographql/apollo-android/issues/1582","id":492205441,"node_id":"MDU6SXNzdWU0OTIyMDU0NDE=","number":1582,"title":"Common fields for interfaces no longer generated with new compiler","user":{"login":"hedvigoscar","id":39644124,"node_id":"MDQ6VXNlcjM5NjQ0MTI0","avatar_url":"https://avatars3.githubusercontent.com/u/39644124?v=4","gravatar_id":"","url":"https://api.github.com/users/hedvigoscar","html_url":"https://github.com/hedvigoscar","followers_url":"https://api.github.com/users/hedvigoscar/followers","following_url":"https://api.github.com/users/hedvigoscar/following{/other_user}","gists_url":"https://api.github.com/users/hedvigoscar/gists{/gist_id}","starred_url":"https://api.github.com/users/hedvigoscar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hedvigoscar/subscriptions","organizations_url":"https://api.github.com/users/hedvigoscar/orgs","repos_url":"https://api.github.com/users/hedvigoscar/repos","events_url":"https://api.github.com/users/hedvigoscar/events{/privacy}","received_events_url":"https://api.github.com/users/hedvigoscar/received_events","type":"User","site_admin":false},"labels":[{"id":838059778,"node_id":"MDU6TGFiZWw4MzgwNTk3Nzg=","url":"https://api.github.com/repos/apollographql/apollo-android/labels/investigation","name":"investigation","color":"5723a0","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2019-09-11T12:25:42Z","updated_at":"2019-10-13T04:26:17Z","closed_at":"2019-10-13T04:26:17Z","author_association":"NONE","body":"Hi,\r\n\r\nWe're having an issue where the new compiler is not generating common fields. I'm having a little trouble expressing the issue properly so I will just link to the offending code:\r\n\r\n```graphql\r\nquery ChatMessages {\r\n  messages {\r\n    ... ChatMessageFragment\r\n  }\r\n}\r\n\r\nsubscription ChatMessage {\r\n  message {\r\n    ... ChatMessageFragment\r\n  }\r\n}\r\n\r\nfragment ChatMessageFragment on Message {\r\n  globalId\r\n  id\r\n  header {\r\n    fromMyself\r\n    statusMessage\r\n    editAllowed\r\n    pollingInterval\r\n    richTextChatCompatible\r\n  }\r\n  body {\r\n    ... on MessageBodySingleSelect {\r\n      type\r\n      choices {\r\n        ... on MessageBodyChoicesSelection {\r\n          type\r\n          value\r\n          text\r\n          selected\r\n          clearable\r\n        }\r\n        ... on MessageBodyChoicesLink {\r\n          type\r\n          value\r\n          text\r\n          selected\r\n          view\r\n          appUrl\r\n          webUrl\r\n        }\r\n        ... on MessageBodyChoicesUndefined {\r\n          type\r\n          value\r\n          text\r\n          selected\r\n        }\r\n      }\r\n    }\r\n    ... on MessageBodyCore {\r\n      type\r\n      text\r\n    }\r\n    ... on MessageBodyFile {\r\n      file {\r\n        signedUrl\r\n      }\r\n    }\r\n    ... on MessageBodyText {\r\n      keyboard\r\n      placeholder\r\n    }\r\n    ... on MessageBodyNumber {\r\n      keyboard\r\n      placeholder\r\n    }\r\n    ... on MessageBodyParagraph {\r\n      id\r\n      text\r\n      type\r\n    }\r\n    ... on MessageBodyAudio {\r\n      id\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n`MessageBodyCore` is implemented for every case of the `MessageBody` union, as can be seen here in the schema definition: https://github.com/HedvigInsurance/giraffe/blob/master/src/schema.graphqls#L79\r\n\r\nWith the previous compiler, the fields `text` and `type` were present on the generated `ChatMessageFragment.Body`-type, but with the new compiler they are not."}}
{"actor":{"display_login":"sav007"}}