query UnionQuery {
  names {
    __typename
    ... on Dog {
      name
    }
    ... on Person {
      firstName
      lastName
    }
    ... on Organization {
      title
    }
  }
}

fragment NamesFragment on NamedThing {
  __typename
  ... on Dog {
    name
  }
  ... on Person {
    firstName
  }
  ... on Organization {
    title
  }
}

query FragmentOnUnion {
  names {
    ...NamesFragment
  }
}

query FragmentAndMoreOnUnion {
  names {
    ...NamesFragment
    ... on Dog {
      isGoodDog
    }
  }
}
