Opentargets Graphql Tools#
Configuration File: opentargets_graphql_tools.json
Tool Type: Local
Tools Count: 2
This page contains all tools defined in the opentargets_graphql_tools.json configuration file.
Available Tools#
OpenTargets_get_graphql_schema (Type: OpenTargetsGraphQLSchemaTool)#
Describe the Open Targets Platform GraphQL schema so a query can be written for OpenTargets_query…
OpenTargets_get_graphql_schema tool specification
Tool Information:
Name:
OpenTargets_get_graphql_schemaType:
OpenTargetsGraphQLSchemaToolDescription: Describe the Open Targets Platform GraphQL schema so a query can be written for OpenTargets_query_graphql. Without type_name it lists the root queries (target, disease, drug, variant, study, credibleSet, search, mapIds, …) with their arguments and return types plus the names of every type. With type_name (case-sensitive, e.g. ‘Target’, ‘Disease’, ‘Drug’, ‘Evidence’) it lists that type’s fields with GraphQL types, arguments and descriptions, or the values of an enum.
Parameters:
type_name([‘string’, ‘null’]) (optional) GraphQL type to describe, e.g. ‘Target’. Omit to list the root queries and all type names.
Example Usage:
query = {
"name": "OpenTargets_get_graphql_schema",
"arguments": {
}
}
result = tu.run(query)
OpenTargets_query_graphql (Type: OpenTargetsGraphQLQueryTool)#
Run any read-only GraphQL query against the Open Targets Platform API (targets, diseases, drugs, …
OpenTargets_query_graphql tool specification
Tool Information:
Name:
OpenTargets_query_graphqlType:
OpenTargetsGraphQLQueryToolDescription: Run any read-only GraphQL query against the Open Targets Platform API (targets, diseases, drugs, variants, GWAS studies, credible sets, evidence, associations, tractability, safety, expression …). Use this when none of the dedicated OpenTargets_* tools returns the field you need: read the schema with OpenTargets_get_graphql_schema, then send a query such as ‘{ target(ensemblId: “ENSG00000141510”) { approvedSymbol biotype } }’ or a parameterised one with variables. Returns the GraphQL data object; partial-result errors are reported in metadata.graphql_errors and a failed query returns status=error with the server’s message. Mutations are refused.
Parameters:
query(string) (required) GraphQL query document, e.g. ‘{ target(ensemblId: “ENSG00000141510”) { approvedSymbol biotype } }’variables([‘object’, ‘string’, ‘null’]) (optional) Variables for a parameterised query, as a JSON object (or a JSON string)
Example Usage:
query = {
"name": "OpenTargets_query_graphql",
"arguments": {
"query": "example_value"
}
}
result = tu.run(query)