mirror of
https://github.com/graphql-python/graphene.git
synced 2024-11-22 09:36:44 +03:00
Fixed Relay Connection name
This commit is contained in:
parent
92b04225b2
commit
5287758f0e
|
@ -49,7 +49,7 @@ class ConnectionMeta(ObjectTypeMeta):
|
|||
|
||||
options = Options(
|
||||
attrs.pop('Meta', None),
|
||||
name=None,
|
||||
name=name,
|
||||
description=None,
|
||||
node=None,
|
||||
)
|
||||
|
@ -61,7 +61,7 @@ class ConnectionMeta(ObjectTypeMeta):
|
|||
'Received incompatible node "{}" for Connection {}.'
|
||||
).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:
|
||||
options.name = '{}Connection'.format(base_name)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user