Skip to content

Commit

Permalink
Abstract GraphQL variables handling. Closes #902.
Browse files Browse the repository at this point in the history
  • Loading branch information
jshcodes committed Feb 1, 2023
1 parent b879069 commit 4336aa0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/falconpy/identity_protection.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ def graphql(self: object, body: dict = None, **kwargs) -> dict:
{
"query": "string"
}
query -- JSON-similar string.
query -- JSON-similar string. (GraphQL syntax)
variables -- variables to use for interpolation. Dictionary.
This method only supports keywords for providing arguments.
Currently using a non-standard body payload format.
Expand All @@ -85,6 +86,8 @@ def graphql(self: object, body: dict = None, **kwargs) -> dict:
if not body:
body = {}
body["query"] = kwargs.get("query", "{}")
if kwargs.get("variables", None):
body["variables"] = kwargs.get("variables")

return process_service_request(
calling_object=self,
Expand Down

0 comments on commit 4336aa0

Please sign in to comment.