-
Notifications
You must be signed in to change notification settings - Fork 30
Closed
Labels
Description
I have a type declaration:
kind_to_parse = {
long = types.long.parseLiteral,
float = types.float.parseLiteral,
string = types.string.parseLiteral,
boolean = types.boolean.parseLiteral,
}
types_any = types.scalar{
name = 'Any',
serialize = tostring, -- not used
parseValue = tostring, -- not used
parseLiteral = function(lit)
if kind_to_parse[lit.kind] then
return kind_to_parse[lit.kind](lit)
end
return nil
end,
isValueOfTheType = function(value)
return type(value) ~= 'table'
end
}
And I make a query - works OK:
query($login: Any, $is_active: Boolean) {
Smth(first: 100, cid: [$login], is_active: $is_active) {
myarg
}
}
After changing "Any" to "String" query still works fine but GraphiQL shows an error: