Skip to content

Commit bc070c3

Browse files
no1semanTotktonada
authored andcommitted
Fix specifiedByUrl -> specifiedByURL
According to spec URL in specifiedByURL must be uppercase
1 parent 0104640 commit bc070c3

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

graphql/introspection.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -346,11 +346,11 @@ __Type = types.object({
346346
end,
347347
},
348348

349-
specifiedByUrl = {
349+
specifiedByURL = {
350350
kind = types.string,
351351
resolve = function(kind)
352352
if kind.__type == 'Scalar' then
353-
return kind.specifiedByUrl
353+
return kind.specifiedByURL
354354
end
355355
end,
356356
},

graphql/types.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ function types.scalar(config)
9696
parseValue = config.parseValue,
9797
parseLiteral = config.parseLiteral,
9898
isValueOfTheType = config.isValueOfTheType,
99-
specifiedByUrl = config.specifiedByUrl,
99+
specifiedByURL = config.specifiedByURL,
100100
}
101101

102102
instance.nonNull = types.nonNull(instance)

test/integration/graphql_test.lua

+3-3
Original file line numberDiff line numberDiff line change
@@ -1427,7 +1427,7 @@ function g.test_custom_directives()
14271427
t.assert_equals(errors, nil)
14281428
end
14291429

1430-
function g.test_specifiedByUrl_scalar_field()
1430+
function g.test_specifiedByURL_scalar_field()
14311431
local function callback(_, _)
14321432
return nil
14331433
end
@@ -1445,7 +1445,7 @@ function g.test_specifiedByUrl_scalar_field()
14451445
isValueOfTheType = function(_)
14461446
return true
14471447
end,
1448-
specifiedByUrl = 'http://localhost',
1448+
specifiedByURL = 'http://localhost',
14491449
})
14501450

14511451
local query_schema = {
@@ -1461,7 +1461,7 @@ function g.test_specifiedByUrl_scalar_field()
14611461
local data, errors = check_request(introspection.query, query_schema)
14621462
local CustomInt_schema = util.find_by_name(data.__schema.types, 'CustomInt')
14631463
t.assert_type(CustomInt_schema, 'table', 'CustomInt schema found on introspection')
1464-
t.assert_equals(CustomInt_schema.specifiedByUrl, 'http://localhost')
1464+
t.assert_equals(CustomInt_schema.specifiedByURL, 'http://localhost')
14651465
t.assert_equals(errors, nil)
14661466
end
14671467

test/integration/introspection.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ return {
2424
kind
2525
name
2626
description
27-
specifiedByUrl
27+
specifiedByURL
2828
fields(includeDeprecated: true) {
2929
name
3030
description

0 commit comments

Comments
 (0)