We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python SDK
Right now, we can provide a dict when we create a new node, as a user I would like to have a similar function to be able to update an existing node.
It will allow to update node in a cleaner manner in integrations
I currently have something like this to do it :
for attr_name in data: if attr_name in tmp_obj._schema.attribute_names: attr_schema = next(attr for attr in tmp_obj._schema.attributes if attr.name == attr_name) attr_data = data.get(attr_name) new_attr = Attribute(name=attr_name, schema=attr_schema, data=attr_data) setattr(tmp_obj, attr_name, new_attr) elif attr_name in tmp_obj._schema.relationship_names: rel_schema = next(rel for rel in self._schema.relationships if rel.name == attr_name) rel_data = data.get(attr_name) if rel_schema.cardinality == RelationshipCardinality.ONE: setattr(tmp_obj, f"_{attr_name}", None) setattr( tmp_obj, attr_name, generate_relationship_property(name=attr_name, node=tmp_obj), ) elif rel_schema.cardinality == RelationshipCardinality.MANY: setattr( tmp_obj, attr_name, RelationshipManagerSync( name=attr_name, client=tmp_obj._client, node=tmp_obj, branch=tmp_obj._branch, schema=rel_schema, data=rel_data, ), )
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Component
Python SDK
Describe the Feature Request
Right now, we can provide a dict when we create a new node, as a user I would like to have a similar function to be able to update an existing node.
Describe the Use Case
It will allow to update node in a cleaner manner in integrations
Additional Information
I currently have something like this to do it :
The text was updated successfully, but these errors were encountered: