Examples
StuccoJS Examples
This example shows a simple GraphQL schema with one string field resolver:
type Query{
hello: String
}
schema{
query: Query
}{
"resolvers":{
"Query.hello":{
"resolve":{
"name": "lib/hello"
}
}
}
}export function handler(input){
return "Hello world"
}When the following query is executed:
{
hello
}It should yield this response:
{
"hello": "Hello world"
}Last updated
Was this helpful?