mirror of
https://github.com/graphql-python/graphene.git
synced 2024-11-23 01:56:54 +03:00
Fixed Relay Connection name
This commit is contained in:
parent
92b04225b2
commit
5287758f0e
|
@ -49,7 +49,7 @@ class ConnectionMeta(ObjectTypeMeta):
|
||||||
|
|
||||||
options = Options(
|
options = Options(
|
||||||
attrs.pop('Meta', None),
|
attrs.pop('Meta', None),
|
||||||
name=None,
|
name=name,
|
||||||
description=None,
|
description=None,
|
||||||
node=None,
|
node=None,
|
||||||
)
|
)
|
||||||
|
@ -61,7 +61,7 @@ class ConnectionMeta(ObjectTypeMeta):
|
||||||
'Received incompatible node "{}" for Connection {}.'
|
'Received incompatible node "{}" for Connection {}.'
|
||||||
).format(options.node, name)
|
).format(options.node, name)
|
||||||
|
|
||||||
base_name = re.sub('Connection$', '', name)
|
base_name = re.sub('Connection$', '', options.name) or options.node._meta.name
|
||||||
if not options.name:
|
if not options.name:
|
||||||
options.name = '{}Connection'.format(base_name)
|
options.name = '{}Connection'.format(base_name)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user