This repository was archived by the owner on Apr 14, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-13
lines changed Expand file tree Collapse file tree 2 files changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,16 @@ local function avro_type(avro_schema)
57
57
error (' unrecognized avro-schema type: ' .. json .encode (avro_schema ))
58
58
end
59
59
60
- local nullable = utils .nullable
60
+ -- XXX: recursive skip several NonNull's?
61
+ local function nullable (gql_class )
62
+ assert (type (gql_class ) == ' table' , ' gql_class must be a table, got ' ..
63
+ type (gql_class ))
64
+
65
+ if gql_class .__type ~= ' NonNull' then return gql_class end
66
+
67
+ assert (gql_class .ofType ~= nil , ' gql_class.ofType must not be nil' )
68
+ return gql_class .ofType
69
+ end
61
70
62
71
local types_long = types .scalar ({
63
72
name = ' Long' ,
Original file line number Diff line number Diff line change @@ -132,16 +132,4 @@ function utils.gen_booking_table(data)
132
132
})
133
133
end
134
134
135
- -- XXX: recursive skip several NonNull's?
136
- function utils .nullable (gql_class )
137
- assert (type (gql_class ) == ' table' , ' gql_class must be a table, got ' ..
138
- type (gql_class ))
139
-
140
- if gql_class .__type ~= ' NonNull' then return gql_class end
141
-
142
- assert (gql_class .ofType ~= nil , ' gql_class.ofType must not be nil' )
143
- return gql_class .ofType
144
- end
145
-
146
-
147
135
return utils
You can’t perform that action at this time.
0 commit comments