Skip to content

Commit

Permalink
allow editing op name and args after init
Browse files Browse the repository at this point in the history
  • Loading branch information
pwyllcrusader committed Sep 2, 2024
1 parent fbee55d commit 1b1d3c0
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions sgqlc/operation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2502,6 +2502,26 @@ def __init__(self, typ=None, name=None, **args):
self.__args._set_container(typ.__schema__, self)
self.__selection_list = SelectionList(typ)

@property
def name(self):
return self.__name

@name.setter
def name(self, value):
self.__name = value

@property
def args(self):
return self.__args

@args.setter
def args(self, variables_dict):
variable_args = OrderedDict()
for k, v in variables_dict.items():
variable_args['$' + k] = v
self.__args = ArgDict(variable_args)
self.__args._set_container(self.__type.__schema__, self)

def _get_kind(self):
typ = self.__type
schema = typ.__schema__
Expand Down

0 comments on commit 1b1d3c0

Please sign in to comment.