Skip to content

Commit 6c109be

Browse files
author
RoFlection Bot
committed
preserve function names in rules (#237)
1 parent 23ff570 commit 6c109be

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

rotriever.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "GraphQL"
3-
version = "15.5.3"
3+
version = "15.5.4"
44
authors = [
55
"Chris Trześniewski <k.trzesniewski@gmail.com>",
66
"Ignacio Falk <flakolefluk@gmail.com>",

src/validation/rules/KnownDirectivesRule.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ local getDirectiveLocationForOperation
3232
-- * A GraphQL document is only valid if all `@directives` are known by the
3333
-- * schema and legally positioned.
3434
-- */
35-
exports.KnownDirectivesRule = function(context)
35+
local function KnownDirectivesRule(context)
3636
local locationsMap = {}
3737

3838
local schema = context:getSchema()
@@ -78,6 +78,7 @@ exports.KnownDirectivesRule = function(context)
7878
end,
7979
}
8080
end
81+
exports.KnownDirectivesRule = KnownDirectivesRule
8182

8283
function getDirectiveLocationForASTPath(ancestors)
8384
local appliedTo = ancestors[#ancestors]

src/validation/rules/NoUnusedFragmentsRule.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ local exports = {}
1717
-- * A GraphQL document is only valid if all fragment definitions are spread
1818
-- * within operations, or spread within other fragments spread within operations.
1919
-- */
20-
exports.NoUnusedFragmentsRule = function(context)
20+
local function NoUnusedFragmentsRule(context)
2121
local operationDefs = {}
2222
local fragmentDefs = {}
2323

@@ -54,5 +54,6 @@ exports.NoUnusedFragmentsRule = function(context)
5454
},
5555
}
5656
end
57+
exports.NoUnusedFragmentsRule = NoUnusedFragmentsRule
5758

5859
return exports

src/validation/rules/NoUnusedVariablesRule.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ local exports = {}
1717
-- * A GraphQL operation is only valid if all variables defined by an operation
1818
-- * are used, either directly or within a spread fragment.
1919
-- */
20-
exports.NoUnusedVariablesRule = function(context)
20+
local function NoUnusedVariablesRule(context)
2121
local variableDefs = {}
2222

2323
return {
@@ -57,5 +57,6 @@ exports.NoUnusedVariablesRule = function(context)
5757
end,
5858
}
5959
end
60+
exports.NoUnusedVariablesRule = NoUnusedVariablesRule
6061

6162
return exports

0 commit comments

Comments
 (0)