biocontext_kb.core.opentargets
==============================

.. py:module:: biocontext_kb.core.opentargets


Functions
---------

.. autoapisummary::

   biocontext_kb.core.opentargets.get_open_targets_graphql_schema
   biocontext_kb.core.opentargets.get_open_targets_query_examples
   biocontext_kb.core.opentargets.query_open_targets_graphql


Package Contents
----------------

.. py:function:: get_open_targets_graphql_schema()

   Retrieve the Open Targets GraphQL schema for query construction.

   :returns: Schema string in format {'schema': '...'} containing GraphQL type definitions or error message.
   :rtype: dict


.. py:function:: get_open_targets_query_examples()

   Retrieve example GraphQL queries for the Open Targets API. Examples demonstrate common use cases.

   :returns: Example queries mapped by category (informationForTarget, drugsForTarget, associatedDiseases, etc.) with GraphQL query strings.
   :rtype: dict


.. py:function:: query_open_targets_graphql(query_string, variables = None)

   Execute GraphQL queries against the Open Targets API. Use get_open_targets_query_examples() or get_open_targets_graphql_schema() first.

   :returns: GraphQL response with data field containing targets, diseases, drugs, variants, studies or error message.
   :rtype: dict


