HomeDev guideRecipesAPI Reference
Dev guideUser GuidesLegal TermsNuGetDev CommunityOptimizely AcademySubmit a ticketLog In
Dev guide

Operation name

Set the operation name for the search query.

Optimizely Graph's query has an OperationName as the query's name. In the Optimizely Graph .NET Client, you can set the name for the query’s operation using the method OperationName. By default, the name is "SampleQuery", but you should specify the name for tracing the query log.

👍

Beta

The Optimizely Graph .NET Client is in beta. Contact your Customer Success Manager for information.

The OperationName is a string with no space characters and must start with a letter or underscore. If your parameter does not match the validation, it will use the default OperationName.

📘

Note

The length of OperationName must be less than 25 characters.

For example:

var query1 = queryBuilder
.OperationName(“CountDocuments”) //valid
.ForType<MyDocumentType>()
.Total()
.ToQuery()
.BuildQueries();

var query2 = queryBuilder
.OperationName(“1_times_query”) //invalid because not allow number at the begining
.ForType<MyDocumentType>()
.Total()
.ToQuery()
.BuildQueries();

var query3 = queryBuilder
.OperationName(“__MyQuery__”) //valid
.ForType<MyDocumentType>()
.Total()
.ToQuery()
.BuildQueries();