.. _step-GQLRequest: GQLRequest ========== Query a remote GraphQL endpoint and retrieve the data. .. versionadded:: 1.6.0 * **Friendly name:** ``GraphQL Request`` * **Step class:** ``base_steps_syncpack.steps.GQLRequest.GQLRequest`` * **Step version:** ``1.0.0`` * **Required parameters:** ``prefix_url`` Parameters ---------- .. list-table:: :header-rows: 1 :widths: 22 16 8 16 38 * - Name - Type - Required - Default - Description * - ``sub_key`` - string - no - -- - Sub Key of the GQL Response to Page over. Example: ``constituents`` * - ``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. * - ``gql_limit_name`` - string - no - ``first`` - The variable name for the max number of records to fetch in one GQL request. * - ``gql_offset_name`` - string - no - ``after`` - The variable name for the next cursor to be fetched in GQL request. * - ``gql_chunk_size`` - number - no - ``500`` - The max number of records to fetch in one GQL request. Required inherited parameters ----------------------------- These are defined on :ref:`step-HTTPBaseStep` but are **required** here, so a working configuration must set them. .. list-table:: :header-rows: 1 :widths: 22 16 8 16 38 * - Name - Type - Required - Default - Description * - ``prefix_url`` - string - yes - -- - used with relative_url to create the full URL. Example: ``http://host.example.com`` Other inherited parameters -------------------------- This step also accepts 31 optional parameter(s) inherited from :ref:`step-HTTPBaseStep`. Every step also accepts the platform parameters common to all steps -- see :ref:`platform-parameters`. Dependencies ------------ * **Inherits from:** ``GQLRequest`` -> ``HTTPBaseStep`` -> ``BaseStep`` -> ``Serializable`` * **SyncPack modules:** ``base_steps_syncpack.steps.HTTPBaseStep``, ``base_steps_syncpack.util.gql_utils``, ``base_steps_syncpack.util.request_params``, ``base_steps_syncpack.util.request_utils`` * **External packages:** ``ipaascommon`` .. include:: /_step_notes/GQLRequest.rst API --- .. autoclass:: base_steps_syncpack.steps.GQLRequest.GQLRequest :members: :show-inheritance: