Realm Custom Resolver

I wrote custom resolver whose output payload is a list of an existing schema. The custom returns an array which I checked in the logs and on using this custom resolver in graphiql, it works perfectly.
The problem arises when I call this revolver on my client app using Apollo. I get the following error:

   Error: User Error: expected iterable, but did not find one for field Query.fetchSecondaryBusinessAccounts.
    at new ApolloError (index.ts:49)
    at QueryData._this.getQueryResult (QueryData.ts:366)
    at QueryData.getExecuteResult (QueryData.ts:151)

I have had similar errors with Custom Resolvers. The iterable error always threw me for a loop (pun intended).

I found the true problem when I checked my logs in the Realm Web UI under “Manage” and then “Logs”. While the requests status may say “OK” when you open the log you’ll see the true cause of the error. For me, it was my Javascript function that I wrote in the Realm Web UI.

In short, check the logs to see if it leads you to the true reason behind the error on the client.