mirror of
https://github.com/graphql-python/graphene.git
synced 2025-09-21 11:22:33 +03:00
Add test for Node.Field with custom name
This commit is contained in:
parent
675743fe17
commit
87462306cb
|
@ -110,6 +110,12 @@ def test_node_field_custom():
|
||||||
assert node_field.node_type == Node
|
assert node_field.node_type == Node
|
||||||
|
|
||||||
|
|
||||||
|
def test_node_field_custom_name():
|
||||||
|
name = "my_named_node"
|
||||||
|
named_node_field = Node.Field(name=name)
|
||||||
|
assert named_node_field.name == name
|
||||||
|
|
||||||
|
|
||||||
def test_node_field_only_type():
|
def test_node_field_only_type():
|
||||||
executed = schema.execute(
|
executed = schema.execute(
|
||||||
'{ onlyNode(id:"%s") { __typename, name } } ' % Node.to_global_id("MyNode", 1)
|
'{ onlyNode(id:"%s") { __typename, name } } ' % Node.to_global_id("MyNode", 1)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user