diff --git a/common/schemas/cross_reference.graphql b/common/schemas/cross_reference.graphql index 5d276a3..5c2ddb4 100644 --- a/common/schemas/cross_reference.graphql +++ b/common/schemas/cross_reference.graphql @@ -1,39 +1,140 @@ +""" +Represents an external reference. +A reference to a database outside of Ensembl. +""" type ExternalReference { - # A reference to a database outside of Ensembl + """ + The accession ID of the external reference. + """ accession_id: String! + + """ + The name of the external reference. + """ name: String! + + """ + A description of the external reference. + """ description: String + + """ + The method used to assign this external reference. + """ assignment_method: XrefMethod! + + """ + The URL of the external reference. + """ url: String + + """ + The source database of the external reference. + """ source: ExternalDB! } +""" +Some metadata about databases outside of Ensembl. +""" type ExternalDB { - # Some metadata about databases outside of Ensembl + """ + The unique identifier for the external database. + """ id: String! + + """ + The name of the external database. + """ name: String! + + """ + A description of the external database. + """ description: String + + """ + The URL of the external database. + """ url: String + + """ + The release version of the external database. + """ release: String } +""" +Differentiate by reference assignment method. +""" type XrefMethod { - # Differentiate by ref assignment method + """ + The type of information for the reference assignment method. + """ type: InfoType! + + """ + A description of the reference assignment method. + """ description: String } +""" +Enum of valid types in the external reference pipeline. +""" enum InfoType { - # Enum of valid types in the external reference pipeline + """ + Projection method. + """ PROJECTION + + """ + Miscellaneous method. + """ MISC + + """ + Direct method. + """ DIRECT + + """ + Sequence match method. + """ SEQUENCE_MATCH + + """ + Inferred pair method. + """ INFERRED_PAIR + + """ + Probe method. + """ PROBE + + """ + Unmapped method. + """ UNMAPPED + + """ + Coordinate overlap method. + """ COORDINATE_OVERLAP + + """ + Checksum method. + """ CHECKSUM + + """ + No method assigned. + """ NONE + + """ + Dependent method. + """ DEPENDENT } diff --git a/common/schemas/dataset.graphql b/common/schemas/dataset.graphql index cfe7de6..af42347 100644 --- a/common/schemas/dataset.graphql +++ b/common/schemas/dataset.graphql @@ -1,11 +1,49 @@ +""" +Represents a dataset containing various types of data. +""" type Dataset { + """ + The unique identifier for the dataset. + """ dataset_id: String! + + """ + The name of the dataset. + """ name: String! + + """ + The Ensembl release version the dataset is associated with. + """ release: Float! + + """ + The type of the dataset. + """ type: String! + + """ + The source from which the dataset was obtained. + """ source: String! + + """ + The type category of the dataset. + """ dataset_type: String! + + """ + The version of the dataset. + """ version: String + + """ + The date when the dataset was released. + """ release_date: String! + + """ + The release type of the dataset. + """ release_type: String! -} \ No newline at end of file +} diff --git a/common/schemas/gene.graphql b/common/schemas/gene.graphql index 1d7ae2e..b9f7ef1 100644 --- a/common/schemas/gene.graphql +++ b/common/schemas/gene.graphql @@ -1,16 +1,79 @@ +""" +Represents a gene with various transcriptions. +""" type Gene { - # The commonly understood concept of gene, with its various transcriptions. + """ + The commonly understood concept of gene, with its various transcriptions. + """ type: String! + + """ + The stable identifier of the gene. + """ stable_id: String! + + """ + The unversioned stable identifier of the gene. + """ unversioned_stable_id: String! + + """ + The version number of the gene. + """ version: Int + + """ + The symbol of the gene. + """ symbol: String + + """ + The name of the gene. + """ name: String + + """ + The Sequence Ontology (SO) term associated with the gene. + """ so_term: String! + + """ + The list of transcripts associated with the gene. + """ transcripts: [Transcript!]! - transcripts_page(page: Int!, per_page: Int!): TranscriptsPage! + + """ + Fetches a paginated list of transcripts associated with the gene. + """ + transcripts_page( + """ + The page number to fetch. + """ + page: Int!, + + """ + The number of transcripts per page. + """ + per_page: Int! + ): TranscriptsPage! + + """ + The slice of the gene. + """ slice: Slice! + + """ + The external references associated with the gene. + """ external_references: [ExternalReference!]! + + """ + The alternative symbols for the gene. + """ alternative_symbols: [String!]! + + """ + The metadata associated with the gene. + """ metadata: GeneMetadata! } diff --git a/common/schemas/genome.graphql b/common/schemas/genome.graphql index 27df17f..b128927 100644 --- a/common/schemas/genome.graphql +++ b/common/schemas/genome.graphql @@ -1,42 +1,174 @@ +""" +Represents an assembly of genomic data. +""" type Assembly { + """ + The unique identifier for the assembly. + """ assembly_id: String! + + """ + The name of the assembly. + """ name: String! + + """ + The accession ID of the assembly. + """ accession_id: String! + + """ + The body responsible for accessioning the assembly. + """ accessioning_body: String! + + """ + The organism associated with the assembly. + """ organism: Organism! + + """ + The regions included in the assembly. + """ regions: [Region!]! + + """ + Indicates if this assembly is the default one. + """ default: Boolean! + + """ + The Tree of Life ID (ToLID) of the assembly. + """ tolid: String } +""" +Represents an organism, including its assemblies and species. +""" type Organism { + """ + The scientific name of the organism. + """ scientific_name: String! + + """ + The common parlance name of the organism. + """ scientific_parlance_name: String + + """ + The species to which the organism belongs. + """ species: Species! + + """ + The unique identifier for the organism. + """ id: String! + + """ + The assemblies associated with the organism. + """ assemblies: [Assembly!]! + + """ + Indicates if this organism is the reference organism. + """ is_reference_organism: Boolean } +""" +Represents a species, including its scientific and common names. +""" type Species { + """ + The scientific name of the species. + """ scientific_name: String! + + """ + The NCBI common name of the species. + """ ncbi_common_name: String + + """ + Alternative names for the species. + """ alternative_names: [String!]! + + """ + The taxonomic ID of the species. + """ taxon_id: Int! + + """ + The organisms that belong to this species. + """ organisms: [Organism!]! } +""" +Represents a genome with various associated data. +""" type Genome { + """ + The unique identifier for the genome. + """ genome_id: String! + + """ + The accession ID of the genome's assembly. + """ assembly_accession: String! + + """ + The scientific name of the genome. + """ scientific_name: String! + + """ + The release number of the genome. + """ release_number: Float! + + """ + The date when the genome was released. + """ release_date: String! + + """ + The taxonomic ID of the genome. + """ taxon_id: Int! + + """ + The Tree of Life ID (ToLID) of the genome. + """ tol_id: String + + """ + The common parlance name of the genome. + """ parlance_name: String + + """ + The genome tag. + """ genome_tag: String + + """ + Indicates if this genome is the reference genome. + """ is_reference: Boolean! + + """ + The assembly associated with the genome. + """ assembly: Assembly + + """ + The datasets associated with the genome. + """ dataset: [Dataset] -} \ No newline at end of file +} diff --git a/common/schemas/metadata.graphql b/common/schemas/metadata.graphql index 421f861..d6642d2 100644 --- a/common/schemas/metadata.graphql +++ b/common/schemas/metadata.graphql @@ -1,96 +1,318 @@ +""" +Interface for metadata derived from a value set. +""" interface ValueSetMetadata { - # Metadata derived from a value set - label: String! - definition: String! - description: String + """ + The label of the value set. + """ + label: String! + + """ + The definition of the value set. + """ + definition: String! + + """ + A description of the value set. + """ + description: String } +""" +Interface for metadata related to external references. +""" interface XrefMetadata { - accession_id: String! - value: String! - url: String! - source: ExternalDB! + """ + The accession ID of the external reference. + """ + accession_id: String! + + """ + The value associated with the external reference. + """ + value: String! + + """ + The URL of the external reference. + """ + url: String! + + """ + The source database of the external reference. + """ + source: ExternalDB! } +""" +Represents metadata for transcript biotype, implementing ValueSetMetadata. +""" type TranscriptBiotypeMetadata implements ValueSetMetadata { - value: String! - label: String! - definition: String! - description: String + """ + The value of the biotype. + """ + value: String! + + """ + The label of the biotype. + """ + label: String! + + """ + The definition of the biotype. + """ + definition: String! + + """ + A description of the biotype. + """ + description: String } +""" +Represents metadata for Gencode basic transcripts, implementing ValueSetMetadata. +""" type TranscriptGencodeBasicMetadata implements ValueSetMetadata { - value: String! - label: String! - definition: String! - description: String + """ + The value of the Gencode basic metadata. + """ + value: String! + + """ + The label of the Gencode basic metadata. + """ + label: String! + + """ + The definition of the Gencode basic metadata. + """ + definition: String! + + """ + A description of the Gencode basic metadata. + """ + description: String } +""" +Represents metadata for Appris transcripts, implementing ValueSetMetadata. +""" type TranscriptApprisMetadata implements ValueSetMetadata { - value: String! - label: String! - definition: String! - description: String + """ + The value of the Appris metadata. + """ + value: String! + + """ + The label of the Appris metadata. + """ + label: String! + + """ + The definition of the Appris metadata. + """ + definition: String! + + """ + A description of the Appris metadata. + """ + description: String } +""" +Represents metadata for transcript support level (TSL), implementing ValueSetMetadata. +""" type TranscriptTSLMetadata implements ValueSetMetadata { - value: String! - label: String! - definition: String! - description: String + """ + The value of the TSL metadata. + """ + value: String! + + """ + The label of the TSL metadata. + """ + label: String! + + """ + The definition of the TSL metadata. + """ + definition: String! + + """ + A description of the TSL metadata. + """ + description: String } +""" +Represents an NCBI transcript. +""" type NCBITranscript { - id: String! - url : String! + """ + The unique identifier for the NCBI transcript. + """ + id: String! + + """ + The URL of the NCBI transcript. + """ + url: String! } +""" +Represents metadata for MANE (Matched Annotation from NCBI and EMBL-EBI) transcripts, implementing ValueSetMetadata. +""" type TranscriptManeMetadata implements ValueSetMetadata { - value: String! - label: String! - definition: String! - description: String - ncbi_transcript: NCBITranscript! + """ + The value of the MANE metadata. + """ + value: String! + + """ + The label of the MANE metadata. + """ + label: String! + + """ + The definition of the MANE metadata. + """ + definition: String! + + """ + A description of the MANE metadata. + """ + description: String + + """ + The NCBI transcript associated with the MANE metadata. + """ + ncbi_transcript: NCBITranscript! } +""" +Represents metadata for Ensembl canonical transcripts, implementing ValueSetMetadata. +""" type TranscriptEnsemblCanonicalMetadata implements ValueSetMetadata { - value: Boolean! - label: String! - definition: String! - description: String + """ + The value of the Ensembl canonical metadata. + """ + value: Boolean! + + """ + The label of the Ensembl canonical metadata. + """ + label: String! + + """ + The definition of the Ensembl canonical metadata. + """ + definition: String! + + """ + A description of the Ensembl canonical metadata. + """ + description: String } +""" +Represents metadata associated with a transcript. +""" type TranscriptMetadata { - gencode_basic: TranscriptGencodeBasicMetadata - biotype : TranscriptBiotypeMetadata! - appris: TranscriptApprisMetadata - tsl: TranscriptTSLMetadata - mane: TranscriptManeMetadata - canonical: TranscriptEnsemblCanonicalMetadata + """ + Metadata for Gencode basic transcripts. + """ + gencode_basic: TranscriptGencodeBasicMetadata + + """ + Metadata for the biotype of the transcript. + """ + biotype: TranscriptBiotypeMetadata! + + """ + Metadata for Appris transcripts. + """ + appris: TranscriptApprisMetadata + + """ + Metadata for the transcript support level (TSL). + """ + tsl: TranscriptTSLMetadata + + """ + Metadata for MANE transcripts. + """ + mane: TranscriptManeMetadata + + """ + Metadata for Ensembl canonical transcripts. + """ + canonical: TranscriptEnsemblCanonicalMetadata } +""" +Represents metadata for a gene biotype. +""" type GeneBiotypeMetadata { - value: String! - label: String! - definition: String! - description: String + """ + The value of the gene biotype. + """ + value: String! + + """ + The label of the gene biotype. + """ + label: String! + + """ + The definition of the gene biotype. + """ + definition: String! + + """ + A description of the gene biotype. + """ + description: String } +""" +Represents metadata for a gene name, including temporary solutions for missing information. +""" type GeneNameMetadata { - # Temp solution: Nullable because some xrefs doesnt have xref accession id eg: PF3D7_1314600 - accession_id: String + """ + The accession ID of the gene name. + """ + # Temp solution: Nullable because some xrefs doesnt have xref accession id eg: PF3D7_1314600 + accession_id: String - # Temp solution: Nullable because some xrefs doesnt have xref description eg: TraesCS1D02G435500 - value: String + """ + The value of the gene name. + """ + # Temp solution: Nullable because some xrefs doesnt have xref description eg: TraesCS1D02G435500 + value: String - # Temp solution: Nullable because URLs will be missing for some genes which has no source information - url: String + """ + The URL of the gene name. + """ + # Temp solution: Nullable because URLs will be missing for some genes which has no source information + url: String - # Temp solution: Nullable because some genes doesnt have source information in the DB - source: ExternalDB + """ + The source database of the gene name. + """ + # Temp solution: Nullable because some genes doesnt have source information in the DB + source: ExternalDB } +""" +Represents metadata associated with a gene. +""" type GeneMetadata { - biotype: GeneBiotypeMetadata! - name: GeneNameMetadata -} \ No newline at end of file + """ + Metadata for the biotype of the gene. + """ + biotype: GeneBiotypeMetadata! + + """ + Metadata for the name of the gene. + """ + name: GeneNameMetadata +} diff --git a/common/schemas/ontology.graphql b/common/schemas/ontology.graphql index eadfd32..0e7558a 100644 --- a/common/schemas/ontology.graphql +++ b/common/schemas/ontology.graphql @@ -1,12 +1,44 @@ +""" +Interface representing an ontology term. +""" interface OntologyTerm { + """ + The accession ID of the ontology term. + """ accession_id: String! + + """ + The value associated with the ontology term. + """ value: String! + + """ + The URL of the ontology term. + """ url: String! + + """ + The source of the ontology term. + """ source: OntologySource } +""" +Interface representing the source of an ontology term. +""" interface OntologySource { + """ + The name of the ontology source. + """ name: String! + + """ + The URL of the ontology source. + """ url: String! + + """ + A description of the ontology source. + """ description: String! } diff --git a/common/schemas/product.graphql b/common/schemas/product.graphql index 46af25b..061933d 100644 --- a/common/schemas/product.graphql +++ b/common/schemas/product.graphql @@ -1,45 +1,144 @@ +""" +Represents a product such as a protein. +""" type Product { """ - the value of the type field is "Protein" + The value of the type field is "Protein". """ type: String! + + """ + The stable identifier for the product. + """ stable_id: String! + + """ + The unversioned stable identifier for the product. + """ unversioned_stable_id: String! + + """ + The version number of the product. + """ version: Int + """ length in amino acids if product is a protein """ length: Int! + """ The value of checksum in the Sequence object can be used to retrieve the sequence from RefGet """ sequence: Sequence! + + """ + The checksum of the sequence. Deprecated. + """ sequence_checksum: String! @deprecated + + """ + The external references associated with the product. + """ external_references: [ExternalReference!]! + + """ + The family matches for the product. + """ family_matches: [FamilyMatch!]! + + """ + The context in which the product is generated. + """ product_generating_context: ProductGeneratingContext } +""" +Represents a family match for a sequence. +""" type FamilyMatch { + """ + The sequence family associated with the family match. + """ sequence_family: SequenceFamily! + + """ + The closest data provider for the family match. + """ via: ClosestDataProvider + + """ + The relative location of the family match. + """ relative_location: Location! + + """ + The hit location of the family match. + """ hit_location: Location + + """ + The score of the family match. + """ score: Float + + """ + The e-value of the family match. + """ evalue: Float } +""" +Represents a sequence family. +""" type SequenceFamily { + """ + The source database of the sequence family. + """ source: ExternalDB! + + """ + The accession ID of the sequence family. + """ accession_id: String! + + """ + The name of the sequence family. + """ name: String! + + """ + The URL of the sequence family. + """ url: String + + """ + A description of the sequence family. + """ description: String } +""" +Represents the closest data provider for a sequence family. +""" type ClosestDataProvider { + """ + The source database of the closest data provider. + """ source: ExternalDB! + + """ + The accession ID of the closest data provider. + """ accession_id: String! + + """ + The URL of the closest data provider. + """ url: String! + + """ + A description of the closest data provider. + """ description: String } diff --git a/common/schemas/query.graphql b/common/schemas/query.graphql index dcefe71..bf683e8 100644 --- a/common/schemas/query.graphql +++ b/common/schemas/query.graphql @@ -1,75 +1,219 @@ -# TODO remove deprecated parameters after clients have migrated - +""" +The root query type. +""" type Query { + """ + Retrieves the current version of the API. + """ version: Version - gene(byId: IdInput @deprecated(reason: "Use `by_id`"), by_id: IdInput): Gene - genes(by_symbol: SymbolInput!): [Gene] - transcript(bySymbol: SymbolInput @deprecated(reason: "Use `by_symbol`"), - by_symbol: SymbolInput, - byId: IdInput @deprecated(reason: "Use `by_id`"), - by_id: IdInput): Transcript - product(genome_id: String @deprecated(reason: "Use `by_id`"), - stable_id: String @deprecated(reason: "Use `by_id`"), - by_id: IdInput): Product - overlap_region(genomeId: String @deprecated(reason: "Use `by_slice`"), - regionName: String @deprecated(reason: "Use `by_slice`"), - start: Int @deprecated(reason: "Use `by_slice`"), - end: Int @deprecated(reason: "Use `by_slice`") - by_slice: SliceInput): Locus - region(by_name: RegionNameInput!): Region - - - genomes(by_keyword: GenomeBySpecificKeywordInput): [Genome] - - genome(by_genome_uuid: GenomeUUIDInput!): Genome - + + """ + Fetches a gene by its ID. + """ + gene( + byId: IdInput @deprecated(reason: "Use `by_id`"), + by_id: IdInput + ): Gene + + """ + Fetches genes by their symbol and genome ID. + """ + genes( + by_symbol: SymbolInput! + ): [Gene] + + """ + Fetches a transcript by its symbol or ID. + """ + transcript( + bySymbol: SymbolInput @deprecated(reason: "Use `by_symbol`"), + by_symbol: SymbolInput, + byId: IdInput @deprecated(reason: "Use `by_id`"), + by_id: IdInput + ): Transcript + + """ + Fetches a product by its genome ID or stable ID. + """ + product( + genome_id: String @deprecated(reason: "Use `by_id`"), + stable_id: String @deprecated(reason: "Use `by_id`"), + by_id: IdInput + ): Product + + """ + Fetches a locus that overlaps a specified region. + """ + overlap_region( + genomeId: String @deprecated(reason: "Use `by_slice`"), + regionName: String @deprecated(reason: "Use `by_slice`"), + start: Int @deprecated(reason: "Use `by_slice`"), + end: Int @deprecated(reason: "Use `by_slice`"), + by_slice: SliceInput + ): Locus + + """ + Fetches a region by its name. + """ + region( + by_name: RegionNameInput! + ): Region + + """ + Fetches genomes by a specific keyword. + """ + genomes( + by_keyword: GenomeBySpecificKeywordInput + ): [Genome] + + """ + Fetches a genome by its UUID. + """ + genome( + by_genome_uuid: GenomeUUIDInput! + ): Genome } +""" +Input type for specifying a gene by its symbol and genome ID. +""" input SymbolInput { + """ + The symbol of the gene. + """ symbol: String + """ + The genome ID associated with the gene. + """ genome_id: String! } +""" +Input type for specifying an ID. +""" input IdInput { + """ + The unique identifier for the genome. + """ genome_id: String! + """ + The stable ID of the gene. + """ stable_id: String! } +""" +Input type for specifying a genomic slice. +""" input SliceInput { + """ + The unique identifier for the genome. + """ genome_id: String! + """ + The name of the region. + """ region_name: String! + """ + The start position of the slice. + """ start: Int! + """ + The end position of the slice. + """ end: Int! } +""" +Represents a locus, a dynamically defined part of a region. +""" type Locus { - # A dynamically defined part of a Region + """ + The genes present in the locus. + """ genes: [Gene!]! + """ + The transcripts present in the locus. + """ transcripts: [Transcript!]! } -input RegionNameInput { +""" +Input type for specifying a region by its name. +""" +input RegionNameInput { + """ + The unique identifier for the genome. + """ genome_id: String! + """ + The name of the region. + """ name: String! } +""" +Input type for specifying a genome by its UUID. +""" input GenomeUUIDInput { + """ + The UUID of the genome. + """ genome_uuid: String! + """ + The release version of the genome. + """ release_version: Float } -input GenomeBySpecificKeywordInput{ - tolid: String - assembly_accession_id: String - assembly_name: String - ensembl_name: String - common_name: String - scientific_name: String - scientific_parlance_name: String - species_taxonomy_id: String - release_version: Float +""" +Input type for fetching genomes by specific keywords. +""" +input GenomeBySpecificKeywordInput { + """ + The Tree of Life ID (ToLID) of the genome. + """ + tolid: String + """ + The accession ID of the assembly. + """ + assembly_accession_id: String + """ + The name of the assembly. + """ + assembly_name: String + """ + The Ensembl name of the genome. + """ + ensembl_name: String + """ + The common name of the genome. + """ + common_name: String + """ + The scientific name of the genome. + """ + scientific_name: String + """ + The common parlance name of the genome. + """ + scientific_parlance_name: String + """ + The taxonomy ID of the species. + """ + species_taxonomy_id: String + """ + The release version of the genome. + """ + release_version: Float } +""" +Input type for specifying an assembly by its accession ID. +""" input AssemblyAccessionIDInput { + """ + The accession ID of the assembly. + """ assembly_accession_id: String! -} \ No newline at end of file +} diff --git a/common/schemas/slice.graphql b/common/schemas/slice.graphql index 73b684e..5e3466e 100644 --- a/common/schemas/slice.graphql +++ b/common/schemas/slice.graphql @@ -1,9 +1,10 @@ +""" +Represents a slice of a gene. +The container that combines Region and Location together to define a precise locus. +The 'default' key defines whether this is the definitive locus for the parent feature. +default:False implies there is another locus which is considered more definitive +""" type Slice { - """ - The container that combines Region and Location together to define a precise locus. - The 'default' key defines whether this is the definitive locus for the parent feature. - default:False implies there is another locus which is considered more definitive - """ region: Region! location: Location! strand: Strand! diff --git a/common/schemas/transcript.graphql b/common/schemas/transcript.graphql index 2930dbb..ccfe5c4 100644 --- a/common/schemas/transcript.graphql +++ b/common/schemas/transcript.graphql @@ -1,3 +1,6 @@ +""" +Represents a paginated list of transcripts. +""" type TranscriptsPage { transcripts: [Transcript!]! page_metadata: PageMetadata! @@ -9,10 +12,11 @@ type PageMetadata { per_page: Int! } +""" +Represents a transcript. +A Transcript of a Gene. Exons are listed in sequence order +""" type Transcript { - """ - A Transcript of a Gene. Exons are listed in sequence order - """ type: String! stable_id: String! unversioned_stable_id: String! diff --git a/common/schemas/version.graphql b/common/schemas/version.graphql index b783c6f..ddaffbe 100644 --- a/common/schemas/version.graphql +++ b/common/schemas/version.graphql @@ -1,9 +1,29 @@ +""" +Represents the version of the API. +""" type Version { + """ + The version information of the API. + """ api: Api! } +""" +Represents the version information of the API. +""" type Api { + """ + The major version of the API. + """ major: String! + + """ + The minor version of the API. + """ minor: String! + + """ + The patch version of the API. + """ patch: String! } diff --git a/graphql_service/server.py b/graphql_service/server.py index 3ac9f3f..4e49f79 100644 --- a/graphql_service/server.py +++ b/graphql_service/server.py @@ -89,38 +89,34 @@ DEFAULT_QUERY = """ # -# GraphiQL is an in -browser tool for writing, validating, and -# testing GraphQL queries. +# Welcome to Ensembl Core GraphQL API! # -# Type queries into this side of the screen, and you will see intelligent -# typeaheads aware of the current GraphQL type schema and live syntax and -# validation errors highlighted within the text. +# This is an in-browser tool for writing, validating, and testing GraphQL queries. # -# GraphQL queries typically start with a "{" character. Lines that start -# with a # are ignored. +# Type queries on the left side of the screen, and you'll see intelligent typeaheads +# aware of the current GraphQL type schema. Live syntax and validation errors +# are highlighted as you type. # -# An example GraphQL query might look like: +# GraphQL queries typically start with a "{" character. Lines starting with "#" are comments. # -# { -# field(arg: "value") { -# subField +# Here's an example query: # -# } +# { +# field(arg: "value") { +# subField +# } +# } # -# } +# In the example below, we've named the query "ENSG00000139618", which is optional. # -# In the example below we added "query ENSG00000139618" -# to give the query a name which is optional -# # Keyboard shortcuts: # -# Prettify query: Shift - Ctrl - P(or press the prettify button) +# Prettify query: Shift + Ctrl + P (or press the prettify button) +# Merge fragments: Shift + Ctrl + M (or press the merge button) +# Run Query: Ctrl + Enter (or press the play button) +# Auto Complete: Ctrl + Space (or just start typing) # -# Merge fragments: Shift - Ctrl - M(or press the merge button) -# -# Run Query: Ctrl - Enter(or press the play button) -# -# Auto Complete: Ctrl - Space(or just start typing) +# Try running the query below to fetch gene information: # query ENSG00000139618 { gene( @@ -136,6 +132,8 @@ } } } + +# Feel free to modify the query or add new ones to explore other data! """