I’m following the docs example here.
There is no spelling error as per previous similar issue.
I created function:
CreateFunction({
name: "function_names",
body: Query(Lambda(["size", "afterCursor", "beforeCursor"],
Map(
Paginate(Functions()),
Lambda("ref",
Select("name", Get(Var("ref")))
)
)
))
})
and schema file:
type Query {
sayHello: String! @resolver(name: "say_hello")
functionNames: [String!] @resolver(name: "function_names", paginated: true)
}
with query:
{
functionNames {
data
}
}
in PG I get:
{
"data": null,
"errors": [
{
"message": "Cannot query field 'functionNames' on type 'Query'. (line 2, column 3):\n functionNames {\n ^",
"locations": [
{
"line": 2,
"column": 3
}
]
}
]
}
Why is this?
What can I do to obtain the correct response:
{
"data": {
"functionNames": {
"data": [
"function_names",
"say_hello"
"submit_order"
]
}
}
}
?
Thanks ...