File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 1
1
import graphene
2
2
from graphene import relay
3
3
from graphene_sqlalchemy import SQLAlchemyObjectType , SQLAlchemyConnectionField
4
- from models import ( Department as DepartmentModel , Employee as EmployeeModel )
4
+ from models import Department , Employee
5
5
6
6
7
- class Department (SQLAlchemyObjectType ):
7
+ class DepartmentNode (SQLAlchemyObjectType ):
8
8
class Meta :
9
- model = DepartmentModel
9
+ model = Department
10
10
interfaces = (relay .Node ,)
11
11
12
12
13
13
class DepartmentConnection (relay .Connection ):
14
14
class Meta :
15
- node = Department
15
+ node = DepartmentNode
16
16
17
17
18
- class Employee (SQLAlchemyObjectType ):
18
+ class EmployeeNode (SQLAlchemyObjectType ):
19
19
class Meta :
20
- model = EmployeeModel
20
+ model = Employee
21
21
interfaces = (relay .Node ,)
22
22
23
23
24
24
class EmployeeConnection (relay .Connection ):
25
25
class Meta :
26
- node = Employee
26
+ node = EmployeeNode
27
27
28
28
29
29
class Query (graphene .ObjectType ):
You can’t perform that action at this time.
0 commit comments