Setup a Dgraph database with a lambda server. Dgraph Lambda is a serverless platform for running JavaScript with Dgraph
host.docker.internal
doesnβt work on older versions of Docker on Linux. You
can use DGRAPH_URL=http://172.17.0.1:8080
instead.webpack --target=webworker
to compile your script.
@slash-graphql/lambda-types
to get types for
addGraphQLResolver
and addGraphQLMultiParentResolver
.
--graphql
superflagβs
lambda-url
option, which is used to set the URL of the lambda server. All the
@lambda
fields are resolved through the lambda functions implemented on the
given lambda server.
For example:
curl
command:
--graphql
superflagβs lambda-url
option to your Alpha configuration. For example:
/app/script/script.js
file. Remember to set the DGRAPH_URL
environment
variable to your Alpha server.
Hereβs a complete Docker example that uses the base Dgraph image and adds Lambda
server support: