function aliasFieldsInInlineFragment(prefix, fragment, document) {
  const { selections } = fragment.selectionSet
  return {
    ...fragment,
    selectionSet: {
      ...fragment.selectionSet,
      selections: aliasFieldsInSelection(prefix, selections, document),
    },
  }
}
Add aliases to top-level fields of the inline fragment.
Returns new inline fragment node.

For Example, transforms:
  ... on Query { foo, ... on Query { bar: foo } }
To
  ... on Query { gatsby1_foo: foo, ... on Query { gatsby1_bar: foo } }