gnomad-browser icon indicating copy to clipboard operation
gnomad-browser copied to clipboard

Add apollo-generated types for gnomAD gene and variant page

Open mattsolo1 opened this issue 3 years ago • 2 comments

Proof-of-concept approach for https://github.com/broadinstitute/gnomad-browser/issues/944... not to be merged.

To generate types from gnomAD API

cd browser

yarn download-schema

yarn generate-types

mattsolo1 avatar Jul 26 '22 16:07 mattsolo1

Any thoughts on his this compares to https://github.com/broadinstitute/gnomad-browser/pull/954?

mattsolo1 avatar Jul 26 '22 16:07 mattsolo1

I kind of wish the generated interface name was the same as __typename. Wonder if there is a way to configure that or if it would lead to name clashes.

For instance, ideally this interface would be called TranscriptConsequence, rather than GnomadVariant_variant_transcript_consequences

export interface GnomadVariant_variant_transcript_consequences {
  __typename: "TranscriptConsequence";
  domains: string[] | null;
  gene_id: string;
  gene_version: string | null;
  gene_symbol: string | null;
  hgvs: string | null;
  hgvsc: string | null;
  hgvsp: string | null;
  is_canonical: boolean | null;
  is_mane_select: boolean | null;
  is_mane_select_version: boolean | null;
  lof: string | null;
  lof_flags: string | null;
  lof_filter: string | null;
  major_consequence: string | null;
  polyphen_prediction: string | null;
  sift_prediction: string | null;
  transcript_id: string;
  transcript_version: string;
}

mattsolo1 avatar Jul 26 '22 17:07 mattsolo1