buildTypeName = (name, prefix) => {
  if (!name || typeof name !== `string`) {
    return null
  }

  if (!prefix) {
    prefix = getPluginOptions().schema.typePrefix
  }

  // this is for our namespace type on the root { wp { ...fields } }
  if (name === prefix) {
    return name
  }

  // Gatsby makes the same type, so we need to rename it to prevent conflicts
  if (name === `Filter`) {
    name = `FilterType`
  }

  if (
    // Starting in WPGraphQL 1.13.0, Gatsby and WPGraphQL both generate types ending in these strings for every node type in the schema, so we need to rename types to prevent conflicts.
    // for users on older versions of WPGraphQL we should try to keep the schema how it was before
    isWpgqlOneThirteenZeroPlus() &&
    (name.endsWith(`Connection`) ||
      name.endsWith(`Edge`) ||
      name.endsWith(`PageInfo`))
  ) {
    name += `Type`
  }

  if (name.startsWith(prefix)) {
    return name
  }

  return prefix + name
}
This function namespaces typenames with a prefix