Skip to content

Commit 30915e6

Browse files
author
Pedro Guilherme Siqueira Moreira
committed
Fix naming bug of EmployeeConnection
This helped fix this: graphql-python/graphene-sqlalchemy#153 (comment)
1 parent 2b0098d commit 30915e6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Diff for: schema.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
import graphene
22
from graphene import relay
33
from graphene_sqlalchemy import SQLAlchemyObjectType, SQLAlchemyConnectionField
4-
from models import (Department as DepartmentModel, Employee as EmployeeModel)
4+
from models import Department, Employee
55

66

7-
class Department(SQLAlchemyObjectType):
7+
class DepartmentNode(SQLAlchemyObjectType):
88
class Meta:
9-
model = DepartmentModel
9+
model = Department
1010
interfaces = (relay.Node,)
1111

1212

1313
class DepartmentConnection(relay.Connection):
1414
class Meta:
15-
node = Department
15+
node = DepartmentNode
1616

1717

18-
class Employee(SQLAlchemyObjectType):
18+
class EmployeeNode(SQLAlchemyObjectType):
1919
class Meta:
20-
model = EmployeeModel
20+
model = Employee
2121
interfaces = (relay.Node,)
2222

2323

2424
class EmployeeConnection(relay.Connection):
2525
class Meta:
26-
node = Employee
26+
node = EmployeeNode
2727

2828

2929
class Query(graphene.ObjectType):

0 commit comments

Comments
 (0)