Lambda resolver on dgraph cloud

Hi,
I am new to dgraph, and trying to grasp the basics. I am going through the examples at https://dgraph.io/docs/graphql/lambda/field/ and onwards.

I am unable to get the lambda mutation and query to work on dgraph cloud, they both fail with “Operations not allowed” with nothing for me to go on / troubleshoot.

I am copy-pasting the schema and the example code from the documentation pages, and I am expecting them to work.
I do not want to spend time setting up things locally, with docker etc, and am targeting dgraph cloud.

  1. Can someone please confirm/ deny that lambda mutations should work in dgraph cloud
  2. If they are expected to work, then can I please request pointers to a working example ? If there is no working example for dgraph cloud I can offer to create a working example if I get appropriate guidance to get it working

Yes, it should.

You should follow this docs
https://dgraph.io/docs/cloud/cloud-api/lambda/

Thanks much.
I have been following fairly the same steps but with the console rather than on the command line.
I am able to get the lambda fields to work, but no luck with query or mutations.

Is there something related to strict mode https://dgraph.io/docs/cloud/admin/schema-modes/ , I am not entirely sure if this has something to do with my “Operations not allowed”. The literature/ notes related to it are hard to understand.

Any insights on what exactly is “operations not allowed - [name of the query/mutation]” ? Any pointers on how can I figure out the issue around lambda fields working , mutations and queries failing ?

How do you run your queries/mutations? Did you set the custom resolvers to public in the cloud admin interface?

I am embarrassed to admit that I had no idea about this earlier. Thanks a lot, that WAS the problem, this work fine with the permissions in place.

1 Like

Glad I could help! :raised_hands:

If you can, please mark the topic as solved.

Cheers!