Name argument ignored in NodeField (Relay)
Looking at the node.py implementation:
class NodeField(Field):
def __init__(self, node, type=False, deprecation_reason=None, name=None, **kwargs):
assert issubclass(node, Node), "NodeField can only operate in Nodes"
self.node_type = node
self.field_type = type
super(NodeField, self).__init__(
# If we don's specify a type, the field type will be the node
# interface
type or node,
description="The ID of the object",
id=ID(required=True),
)
the name argument is not passed to the super class.
Which means that:
CustomNode.Field(
name = 'myCustomTypeName',
type = MyCustomType,
filterset_class = filters.MyCustomTypeFilter
)
does not create a myCustomTypeName type, but uses the default name.
Is there any reason for this?
Looks like a bug to me
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This is probably duplicate of #1035 but because it is still not released, it is issue for graphene v2.x
This is probably duplicate of #1035 but because it is still not released, it is issue for graphene v2.x
This is indeed the same thing... I'm going to request to have it merged into the v2 branch as well as other librairies are still depending on the v2