Closed olegrok closed 2 years ago
It seems, now I should do something like the following to reproduce the problem:
diff --git a/graphql/schema.lua b/graphql/schema.lua
index cff57b4..e1f79b0 100644
--- a/graphql/schema.lua
+++ b/graphql/schema.lua
@@ -183,7 +183,9 @@ function schema:generateTypeMap(node)
end
-- HACK: resolve type names to real types
- field.kind = types.resolve(field.kind, self.name)
+ if type(field.kind) == 'string' then
+ field.kind = types.resolve(field.kind, self.name)
+ end
self:generateTypeMap(field.kind)
end
end
After this I see it:
$ luatest -v -p test_custom_type_scalar_variables
Started on Sat Apr 9 03:08:23 2022
integration.test_custom_type_scalar_variables ... (0.001s) fail
...tarantool-meta/graphql/test/integration/graphql_test.lua:644: expected: {test_json_type_list = {"{\"test\":123}"}}
actual: {test_json_type_list = cdata<void *>: NULL}
=========================================================
Failed tests:
-------------
1) integration.test_custom_type_scalar_variables
...tarantool-meta/graphql/test/integration/graphql_test.lua:644: expected: {test_json_type_list = {"{\"test\":123}"}}
actual: {test_json_type_list = cdata<void *>: NULL}
stack traceback:
...tarantool-meta/graphql/test/integration/graphql_test.lua:644: in function 'integration.test_custom_type_scalar_variables'
...
[C]: in function 'xpcall'
Ran 1 tests in 0.001 seconds, 0 succeeded, 1 failed, 93 not selected
=========================================================
Failed tests:
integration.test_custom_type_scalar_variables
(My module version is 0.1.4.)
@Totktonada since @olegrok wrote a test check_request() implementaion changed and it fails because of wrong arguments
The main problem that our graphql coerseValue doesn't consider hierarchical structure of input object.
See also https://github.com/tarantool/cartridge/commit/fb4b3a360f8f6d6d34384d0ec8961c7dc4cadf7b