File tree Expand file tree Collapse file tree 2 files changed +17
-13
lines changed Expand file tree Collapse file tree 2 files changed +17
-13
lines changed Original file line number Diff line number Diff line change 5
5
6
6
class InstanceType (object ):
7
7
8
- @classmethod
9
- def internal_type (cls , schema ):
10
- return getattr (cls , 'T' , None )
8
+ def internal_type (self , schema ):
9
+ raise NotImplementedError ("internal_type for type {} is not implemented" .format (self .__class__ .__name__ ))
11
10
12
11
13
12
class MountType (InstanceType ):
Original file line number Diff line number Diff line change 4
4
from .base import MountedType
5
5
6
6
7
- class String (MountedType ):
8
- T = GraphQLString
7
+ class ScalarType (MountedType ):
8
+ def internal_type (self , schema ):
9
+ return self ._internal_type
9
10
10
11
11
- class Int ( MountedType ):
12
- T = GraphQLInt
12
+ class String ( ScalarType ):
13
+ _internal_type = GraphQLString
13
14
14
15
15
- class Boolean ( MountedType ):
16
- T = GraphQLBoolean
16
+ class Int ( ScalarType ):
17
+ _internal_type = GraphQLInt
17
18
18
19
19
- class ID ( MountedType ):
20
- T = GraphQLID
20
+ class Boolean ( ScalarType ):
21
+ _internal_type = GraphQLBoolean
21
22
22
23
23
- class Float (MountedType ):
24
- T = GraphQLFloat
24
+ class ID (ScalarType ):
25
+ _internal_type = GraphQLID
26
+
27
+
28
+ class Float (ScalarType ):
29
+ _internal_type = GraphQLFloat
You can’t perform that action at this time.
0 commit comments