parseTypeDef = typeOrTypeDef => {
  if (typeof typeOrTypeDef === `string`) {
    try {
      return parse(typeOrTypeDef)
    } catch (error) {
      reportParsingError(error)
    }
  }
  return typeOrTypeDef
}
Parses type definition represented as an SDL string into an AST Document.
Type definitions of other formats (other than SDL) are returned as is