src/graphql/getGraphqlName.js
function getGraphqlName(g, iri) {
  const { prefixes } = g.config;
  const localName = getIriLocalName(iri);
  const namespaceIri = iri.slice(0, -localName.length);

  const prefix = Object.keys(prefixes).find(key => prefixes[key] === namespaceIri) || '';

  return capitalize(prefix + localName).replace(/\W/g, '_');
}
function getGraphqlName(g, iri) {
  const { prefixes } = g.config;
  const localName = getIriLocalName(iri);
  const namespaceIri = iri.slice(0, -localName.length);

  const prefix = Object.keys(prefixes).find(key => prefixes[key] === namespaceIri) || '';

  return capitalize(prefix + localName).replace(/\W/g, '_');
}
function getGraphqlName ( g , iri ) { const { prefixes } = g . config ; const localName = getIriLocalName ( iri ) ; const namespaceIri = iri . slice ( 0 , - localName . length ) ; const prefix = Object . keys ( prefixes ) . find ( key => prefixes [ key ] === namespaceIri ) || '' ; return capitalize ( prefix + localName ) . replace ( / \W / g , '_' ) ; }
GraphQL-safe name for GraphQL types
GraphQL - safe name for GraphQL types