Skip to content
Merged
Next Next commit
Add test case
  • Loading branch information
JohnnyMorganz committed Aug 21, 2022
commit 9f61e14f346d0403bbe9f42e3c9fc6579df1bee3
21 changes: 21 additions & 0 deletions tests/inputs/hang-prefix-ignore-string.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-- https://github.com/JohnnyMorganz/StyLua/issues/508
exports.ScalarLeafsRule = function(context)
return {
Field = function(_self, node)
if type_ then
if not selectionSet then
context:reportError(
GraphQLError.new(
('Field "%s" of type "%s" must have a selection of subfields. Did you mean "%s { ... }"?'):format(
fieldName,
typeStr,
fieldName
),
node
)
)
end
end
end,
}
end