← Recipe: call a server function

9. Follow one request

generated Luau client · trusted JavaScript handler · about 25 minutes
Luau → RPC transport → handler → typed envelope → Luau

Each stage owns one explicit responsibility, so client state never trusts transport text directly.

When to use it

Read this when a server call appears to start but the expected result does not reach the interface.

  • greet encodes declared input and returns a RequestId immediately.
  • The host sends server.call.v1 to the local RPC endpoint with the operation name and deadline.
  • The backend selects greeting.message.v1, enforces authorization, validates input, and validates its result.
  • app.resolve matches the RequestId and separates transport failure from successful payload decoding.
  • decodeGreet admits only the exact declared result before status changes.

Complete inventory

View all pages in Recipe: call a server function
← Previous: 8. Check and runNext: 10. Keep the production boundary honest →