Skip to content

Commit 5aac8f9

Browse files
no1semanTotktonada
authored andcommitted
Change the way to require internal parts
before this patch all internal requires was made with path = (...):gsub() let's make it common to other tarantool ecosystem way
1 parent 4cbdbed commit 5aac8f9

File tree

8 files changed

+20
-28
lines changed

8 files changed

+20
-28
lines changed

graphql/execute.lua

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
local path = (...):gsub('%.[^%.]+$', '')
2-
local types = require(path .. '.types')
3-
local util = require(path .. '.util')
4-
local introspection = require(path .. '.introspection')
5-
local query_util = require(path .. '.query_util')
6-
local validate_variables = require(path .. '.validate_variables')
1+
local introspection = require('graphql.introspection')
2+
local query_util = require('graphql.query_util')
3+
local types = require('graphql.types')
4+
local util = require('graphql.util')
5+
local validate_variables = require('graphql.validate_variables')
76

87
local function error(...)
98
return _G.error(..., 0)

graphql/introspection.lua

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
local path = (...):gsub('%.[^%.]+$', '')
2-
local types = require(path .. '.types')
3-
local util = require(path .. '.util')
1+
local types = require('graphql.types')
2+
local util = require('graphql.util')
43

54
local __Schema, __Directive, __DirectiveLocation, __Type, __Field, __InputValue,__EnumValue, __TypeKind
65

graphql/query_util.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
local path = (...):gsub('%.[^%.]+$', '')
2-
local types = require(path .. '.types')
1+
local types = require('graphql.types')
32

43
local function typeFromAST(node, schema)
54
local innerType

graphql/rules.lua

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
local path = (...):gsub('%.[^%.]+$', '')
2-
local types = require(path .. '.types')
3-
local util = require(path .. '.util')
4-
local introspection = require(path .. '.introspection')
5-
local query_util = require(path .. '.query_util')
1+
local introspection = require('graphql.introspection')
2+
local query_util = require('graphql.query_util')
3+
local types = require('graphql.types')
4+
local util = require('graphql.util')
65

76
local function error(...)
87
return _G.error(..., 0)

graphql/schema.lua

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
local path = (...):gsub('%.[^%.]+$', '')
2-
local types = require(path .. '.types')
3-
local introspection = require(path .. '.introspection')
1+
local introspection = require('graphql.introspection')
2+
local types = require('graphql.types')
43

54
local function error(...)
65
return _G.error(..., 0)

graphql/types.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
local path = (...):gsub('%.[^%.]+$', '')
2-
local util = require(path .. '.util')
31
local ffi = require('ffi')
2+
local util = require('graphql.util')
43
local format = string.format
54

65
local function error(...)

graphql/validate.lua

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
local path = (...):gsub('%.[^%.]+$', '')
2-
local rules = require(path .. '.rules')
3-
local introspection = require(path .. '.introspection')
4-
local util = require(path .. '.util')
1+
local introspection = require('graphql.introspection')
2+
local rules = require('graphql.rules')
3+
local util = require('graphql.util')
54

65
local function getParentField(context, name, count)
76
if introspection.fieldMap[name] then return introspection.fieldMap[name] end

graphql/validate_variables.lua

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
local path = (...):gsub('%.[^%.]+$', '')
2-
local types = require(path .. '.types')
3-
local util = require(path .. '.util')
1+
local types = require('graphql.types')
2+
local util = require('graphql.util')
43
local check = util.check
54

65
local function error(...)

0 commit comments

Comments
 (0)