diff --git a/config/clients/go/template/README_calling_api.mustache b/config/clients/go/template/README_calling_api.mustache index 6e673c2f..3fefa95d 100644 --- a/config/clients/go/template/README_calling_api.mustache +++ b/config/clients/go/template/README_calling_api.mustache @@ -517,6 +517,8 @@ List the relations a user has on an object. options := ClientListRelationsOptions{ // You can rely on the model id set in the configuration or override it for this specific request AuthorizationModelId: {{packageName}}.PtrString("01GAHCE4YVKPQEKZQHT2R89MQV"), + // Max number of requests to issue in parallel, defaults to 10 + MaxParallelRequests: openfga.PtrInt32(5), } body := ClientListRelationsRequest{ User: "user:81684243-9356-4421-8fbf-a4f8d36aa31b", diff --git a/config/clients/go/template/client/client.mustache b/config/clients/go/template/client/client.mustache index 778cacac..722d56f2 100644 --- a/config/clients/go/template/client/client.mustache +++ b/config/clients/go/template/client/client.mustache @@ -2082,6 +2082,7 @@ type ClientListRelationsRequest struct { type ClientListRelationsOptions struct { AuthorizationModelId *string `json:"authorization_model_id,omitempty"` + MaxParallelRequests *int32 `json:"max_parallel_requests,omitempty"` } type ClientListRelationsResponse struct { @@ -2153,12 +2154,17 @@ func (client *{{appShortName}}Client) ListRelationsExecute(request SdkClientList if err != nil { return nil, err } + var maxParallelReqs *int32 + if request.GetOptions() != nil { + maxParallelReqs = request.GetOptions().MaxParallelRequests + } batchResponse, err := client.BatchCheckExecute(&SdkClientBatchCheckRequest{ ctx: request.GetContext(), Client: client, body: &batchRequestBody, options: &ClientBatchCheckOptions{ AuthorizationModelId: authorizationModelId, + MaxParallelRequests: maxParallelReqs, }, })