fragment DogName on Dog {
  name
}

query QueryOnUnion {
  names {
    __typename
    ...DogName
    ... on Person {
      firstName
      lastName
    }
    ... on Organization {
      title
    }
  }
}
