QueryGQL
Query a remote GraphQL endpoint and retrieve the data.
Added in version 1.0.0.
Friendly name:
Deprecated: Query GraphQLStep class:
base_steps_syncpack.steps.QueryGQL.QueryGQLStep version:
1.4.4Required parameters:
query_url
Parameters
Name |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
string (long) |
no |
– |
The Graphql request to make against the remote endpoint Example: |
|
boolean |
no |
|
Whether or not to read the request from the input of a previous step. Overrides query if set |
|
string |
yes |
– |
THe URL that will be queried using the GQL call Example: |
|
json |
no |
|
gql variables to include with query Example: |
|
boolean |
no |
|
If there are errors found from the GQL response, save them along with the rest of the payload |
|
boolean |
no |
|
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 |
|
boolean |
no |
|
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 |
|
boolean |
no |
|
Set to True for Mutation calls. |
|
string |
no |
– |
Sub Key of the GQL Response to Page over. Example: |
Other inherited parameters
This step also accepts 6 optional parameter(s) inherited from QueryREST.
Every step also accepts the platform parameters common to all steps – see Platform parameters.
Dependencies
Inherits from:
QueryGQL->QueryREST->BaseStep->SerializableSyncPack modules:
base_steps_syncpack.steps.QueryRESTExternal packages:
future,ipaascommon,ipaascore,requests
Warning
Deprecated. execute() logs a warning to refactor to
GQLRequest. See Deprecated steps.
Behaviour
Nominally extends QueryREST, but it does not call
super().__init__(). It therefore declares its own complete parameter set and
reuses only QueryREST.make_rest_call. Treat it as an independent step that
happens to share a base class in name only.
Because of that, it has none of the Shared parameters: HTTPBaseStep machinery: no OAuth,
no bearer token, no mTLS, no token caching. Authentication is Basic
(username / password) or nothing.
Outputs
save_data_for_next_step(save_data):
without
follow_cursor, or for a mutation — theresponse_datadict, or theedgeslist whenedges_onlyis set;with
follow_cursor— a list accumulated across pages.
save_errors wraps the result as {"data_out": ..., "errors": ...}.
Notes
Warning
Cursor following here works by regex-replacing after:"" in the query
text with the last cursor. Your query must literally contain after:"" or
paging silently does nothing and you get one page. GQLRequest
replaced this with proper GraphQL variables (gql_offset_name), which is one
of the main reasons to migrate.
The endpoint parameter is
query_url, not theprefix_url/relative_urlpair used everywhere else.GQLResponseis defined locally in this module rather than imported fromutil.gql_utils, so its behaviour can differ subtly from GQLRequest.