Introduction

ROQ One Backend interacts with the server-side endpoint of ROQ Platform: /v01/server/graphql This endpoint requires a token and an api key to avoid missuse.

How it works

There are two ways to interact with ROQ Platform. You can execute the query or mutation using either the user’s JWT token or the token of a service account. You can learn more about this here: Authentication

Request with the user’s token

For incoming queries or mutations from ROQ One Frontend, you can apply the user’s JWT token. To do this, perform the request using the PlatformClientService. You can find a full example here:

🛠 backend/src/platformClient/platformSpaceClient/services/platform-space-client.service.ts

Request with the service account

In some cases, you may want to perform a query or mutation to ROQ Platform even when there is no user token available. This may happen during cron jobs or if the user has not logged in yet. Here, you can use the PlatformServiceAccountClientService . Please take a look at this example for more information:

🛠 backend/src/platformClient/platformUserClient/services/platform-user-client.service.ts