question

Jose Manuel avatar image
Jose Manuel asked

Is Chaining Azure Functions a good practice?

I have this issue where i want to give a certain item but this has to be done in graphql mutation. i have a implementation where a cloudscript does something and if the result matches the "Azure function" would have to trigger, i have looked for a way that a server could call an azure function but i just found out that the only way to call one is using this PlayFabCloudScriptAPI.ExecuteFunction, my question is should i create 2 functions one that handles the logic on when the other one would be called because if it is done on the client I'm scared that the function can be called by an exploit or a hack and then the whole process of verifying the call server side would be invalid. i hope i explained it correctly if not please ask me any questions u may need i really need help understanding this.

CloudScript
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Sarah Zhang avatar image
Sarah Zhang answered

Could you please clarify why you do not use one Azure Function to handle the logic directly? If, for some reasons, it’s impossible for you to use one Azure Function to handle it. You can also consider using two Azure Functions, Azure Functions support calling the API – PlayFabCloudScriptAPI.ExecuteFunction.

Currently, CloudScript doesn’t support calling the built-in API methods that belong to “cloudscript”set, such as PlayFabCloudScriptAPI.ExecuteFunction. To call this API on CloudScript, you can consider constructing the HTTP requests using the http.request([content]) method of CloudScript manually. Please check this documentation - https://docs.microsoft.com/en-us/gaming/playfab/features/automation/cloudscript/making-webhook-calls-from-cloudscript for more information about REST calls from CloudScript.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.