.. _step-QueryGQL: QueryGQL ======== Query a remote GraphQL endpoint and retrieve the data. .. versionadded:: 1.0.0 * **Friendly name:** ``Deprecated: Query GraphQL`` * **Step class:** ``base_steps_syncpack.steps.QueryGQL.QueryGQL`` * **Step version:** ``1.4.4`` * **Required parameters:** ``query_url`` Parameters ---------- .. list-table:: :header-rows: 1 :widths: 22 16 8 16 38 * - Name - Type - Required - Default - Description * - ``query`` - string (long) - no - -- - The Graphql request to make against the remote endpoint Example: ``{devices{edges {node {id namedetail {statesnmpData {sysdescrsysuptimelastPolllocale}}}}}}`` * - ``query_from_input`` - boolean - no - ``False`` - Whether or not to read the request from the input of a previous step. Overrides query if set * - ``query_url`` - string - yes - -- - THe URL that will be queried using the GQL call Example: ``http://host.example.com/gql`` * - ``variables`` - json - no - ``{}`` - gql variables to include with query Example: ``{'count': 10}`` * - ``save_errors`` - boolean - no - ``False`` - If there are errors found from the GQL response, save them along with the rest of the payload * - ``follow_cursor`` - boolean - no - ``False`` - Whether or not to continually make calls following the last cursor. If this is enabled, their MUST be an after:"" present in your query. The gql query must also be sure to request the cursor property be present in the response, as well requesting pageInfo with hasNextPage in the response * - ``edges_only`` - boolean - no - ``False`` - Whether or not to only include edges when parsing through response and saving data. If true, the return result will be a list of all edges foundwhen following cursor (if enabled). If false, the result will be the 'data' value of the response * - ``mutation`` - boolean - no - ``False`` - Set to True for Mutation calls. * - ``sub_key`` - string - no - -- - Sub Key of the GQL Response to Page over. Example: ``constituents`` Other inherited parameters -------------------------- This step also accepts 6 optional parameter(s) inherited from :ref:`step-QueryREST`. Every step also accepts the platform parameters common to all steps -- see :ref:`platform-parameters`. Dependencies ------------ * **Inherits from:** ``QueryGQL`` -> ``QueryREST`` -> ``BaseStep`` -> ``Serializable`` * **SyncPack modules:** ``base_steps_syncpack.steps.QueryREST`` * **External packages:** ``future``, ``ipaascommon``, ``ipaascore``, ``requests`` .. include:: /_step_notes/QueryGQL.rst