{"action":"created","issue":{"url":"https://api.github.com/repos/apollostack/apollo-client/issues/763","repository_url":"https://api.github.com/repos/apollostack/apollo-client","labels_url":"https://api.github.com/repos/apollostack/apollo-client/issues/763/labels{/name}","comments_url":"https://api.github.com/repos/apollostack/apollo-client/issues/763/comments","events_url":"https://api.github.com/repos/apollostack/apollo-client/issues/763/events","html_url":"https://github.com/apollostack/apollo-client/issues/763","id":182388188,"number":763,"title":"Use fragments of different types in query","user":{"login":"jbreckel","id":9253219,"avatar_url":"https://avatars.githubusercontent.com/u/9253219?v=3","gravatar_id":"","url":"https://api.github.com/users/jbreckel","html_url":"https://github.com/jbreckel","followers_url":"https://api.github.com/users/jbreckel/followers","following_url":"https://api.github.com/users/jbreckel/following{/other_user}","gists_url":"https://api.github.com/users/jbreckel/gists{/gist_id}","starred_url":"https://api.github.com/users/jbreckel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbreckel/subscriptions","organizations_url":"https://api.github.com/users/jbreckel/orgs","repos_url":"https://api.github.com/users/jbreckel/repos","events_url":"https://api.github.com/users/jbreckel/events{/privacy}","received_events_url":"https://api.github.com/users/jbreckel/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/apollostack/apollo-client/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/apollostack/apollo-client/milestones/5","html_url":"https://github.com/apollostack/apollo-client/milestones/New%20API/Refactor","labels_url":"https://api.github.com/repos/apollostack/apollo-client/milestones/5/labels","id":2038838,"number":5,"title":"New API/Refactor","description":"We're doing a major refactor that will significantly streamline the API","creator":{"login":"stubailo","id":448783,"avatar_url":"https://avatars.githubusercontent.com/u/448783?v=3","gravatar_id":"","url":"https://api.github.com/users/stubailo","html_url":"https://github.com/stubailo","followers_url":"https://api.github.com/users/stubailo/followers","following_url":"https://api.github.com/users/stubailo/following{/other_user}","gists_url":"https://api.github.com/users/stubailo/gists{/gist_id}","starred_url":"https://api.github.com/users/stubailo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stubailo/subscriptions","organizations_url":"https://api.github.com/users/stubailo/orgs","repos_url":"https://api.github.com/users/stubailo/repos","events_url":"https://api.github.com/users/stubailo/events{/privacy}","received_events_url":"https://api.github.com/users/stubailo/received_events","type":"User","site_admin":false},"open_issues":41,"closed_issues":1,"state":"open","created_at":"2016-09-29T21:57:55Z","updated_at":"2016-10-11T22:30:42Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2016-10-11T22:14:44Z","updated_at":"2016-10-11T22:43:14Z","closed_at":null,"body":"hey guys,\r\nI am trying to use fragments for different types together like this:\r\n```\r\nconst subjectInfo = createFragment(gql`\r\n  fragment subjectInfo on Subject {\r\n    id\r\n    name\r\n  }`\r\n)\r\nconst businessAreaInfo = createFragment(gql`\r\n  fragment businessAreaInfo on BusinessArea {\r\n    id\r\n    name\r\n    subjects {\r\n      ...subjectInfo\r\n    }\r\n  }`,\r\n  [subjectInfo]\r\n)\r\ngraphql(gql`\r\nquery {\r\n  businessAreas {\r\n    ...businessAreaInfo\r\n  }\r\n}\r\n`, {\r\n  fragments: businessAreaInfo\r\n})\r\n```\r\n\r\nbut the resulting query, that Apollo sends to the server, looks like this:\r\n```\r\n{\r\n  businessAreas {\r\n    ...businessAreaInfo\r\n    ...subjectInfo\r\n  }\r\n}\r\n\r\nfragment businessAreaInfo on BusinessArea {\r\n  id\r\n  name\r\n  subjects {\r\n  ...subjectInfo\r\n  }\r\n}\r\n\r\nfragment subjectInfo on Subject {\r\n  id\r\n  name\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/apollostack/apollo-client/issues/comments/253069126","html_url":"https://github.com/apollostack/apollo-client/issues/763#issuecomment-253069126","issue_url":"https://api.github.com/repos/apollostack/apollo-client/issues/763","id":253069126,"user":{"login":"jbreckel","id":9253219,"avatar_url":"https://avatars.githubusercontent.com/u/9253219?v=3","gravatar_id":"","url":"https://api.github.com/users/jbreckel","html_url":"https://github.com/jbreckel","followers_url":"https://api.github.com/users/jbreckel/followers","following_url":"https://api.github.com/users/jbreckel/following{/other_user}","gists_url":"https://api.github.com/users/jbreckel/gists{/gist_id}","starred_url":"https://api.github.com/users/jbreckel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbreckel/subscriptions","organizations_url":"https://api.github.com/users/jbreckel/orgs","repos_url":"https://api.github.com/users/jbreckel/repos","events_url":"https://api.github.com/users/jbreckel/events{/privacy}","received_events_url":"https://api.github.com/users/jbreckel/received_events","type":"User","site_admin":false},"created_at":"2016-10-11T22:43:14Z","updated_at":"2016-10-11T22:43:14Z","body":"Thanks.\r\n\r\nWhen do you think this will be published?\r\n\r\nDo you have any recommendations how I can work around this issue?\r\nThanks in advance"}}
{"actor":{"display_login":"jbreckel"}}