Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Commit 45f6c0e

Browse files
committed
Make small refactor
1 parent 135db04 commit 45f6c0e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

graphql/query_to_avro.lua

+4-4
Original file line numberDiff line numberDiff line change
@@ -176,19 +176,19 @@ union_to_avro = function(fieldType, subSelections, context)
176176
if box_sub_selections.selectionSet.selections[1].selectionSet ~= nil then
177177
-- Object GraphQL type case.
178178
type_sub_selections =
179-
box_sub_selections.selectionSet.selections[1].selectionSet.selections
179+
box_sub_selections.selectionSet.selections[1].selectionSet.selections
180180
else
181181
-- Scalar GraphQL type case.
182182
type_sub_selections = box_sub_selections.selectionSet.selections[1]
183183
end
184184

185185
if is_multihead then
186186
local avro_type = gql_type_to_avro(type.kind,
187-
type_sub_selections, context, {is_nullable = true})
187+
type_sub_selections, context, {is_nullable = true})
188188
table.insert(result.fields, {name = type.name, type = avro_type})
189189
else
190190
table.insert(result, gql_type_to_avro(type.kind,
191-
type_sub_selections, context))
191+
type_sub_selections, context))
192192
end
193193
end
194194

@@ -224,7 +224,7 @@ local function field_to_avro(object_type, fields, context)
224224
assert(d.kind == "directive")
225225
check(d.name.value, "directive.name.value", "string")
226226
assert(d.name.value == "include" or d.name.value == "skip",
227-
"Only 'include' and 'skip' directives are supported for now")
227+
"Only 'include' and 'skip' directives are supported for now")
228228
end
229229
if type(fieldTypeAvro) == "string" then
230230
if string.sub(fieldTypeAvro, -1) ~= '*' then

0 commit comments

Comments
 (0)