Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added unwrap flag #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexandrecurtelin
Copy link

Since Nakama v.2.7.0 an unwrap query parameter is supported which allows to invoke RPC functions with raw JSON data in the payload.

Since Nakama v.2.7.0 an unwrap query parameter is supported which allows to invoke RPC functions with raw JSON data in the payload.
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

1 similar comment
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@britzl
Copy link
Collaborator

britzl commented Mar 24, 2021

Thank you for the contribution. The change you made was in generated code and would be overwritten the next time the API is generated. I wonder how the unwrap option is applied in other Nakama clients. @novabyte ?

@novabyte
Copy link
Member

@britzl We don't really bother to use the unwrap=1 option in RPCs because the client SDKs can all handle the implicit escaped JSON necessary to send the data to the server (due to the constraints of Protobuf). If we do decide to expose the unwrap version of the RPC method it will probably be lifted to the client object type in the various SDKs and its implementation will not expect to be generated by the codegen tool. Hope this all makes sense.

@britzl
Copy link
Collaborator

britzl commented Mar 25, 2021

Thanks @novabyte . So you are saying that it doesn't make sense to add it to the API and instead let the client deal with it. @alexandrecurtelin does this make sense to you?

@novabyte
Copy link
Member

@britzl My suggestion is to add a method directly to the nakama.lua module with the special overload for the version of RPC which uses unwrap rather than attempt to handle it within the codegen tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants