Not sure if this is a bug but sure is confusing:
Returning in a resolver like
return { data: { data: { success: true, message: "Created units successfully" }, errors: null } }
Testing invoke
from command line:
{"data":{"success":true,"message":"Created units successfully"},"errors":null}
Testing invoke-local
from command line:
Result: { "data": { "data": { "success": true, "message": "Created units successfully" }, "errors": null } }
invoke-local
returns the data exactly as I return it from my function, while invoke
seems to need me to return a wrapped response, and it picks off the value from the data key.
If this was going to be standardised, I prefer the invoke-local
version - just feels cleaner not having to wrap the response inside another object.
Note that I just updated to CLI version 0.0.90 before posting to check that this behaved the same in the latest version.