Client classes
Describes the classes used for requests, responses, and managing the query builder instance.
Beta
The Optimizely Graph .NET Client is in beta. Contact your Customer Success Manager for information.
TypeQueryBuilder
– Used for generating a query for a type. It covers most of the common queries for getting, searching, filtering, and faceting documents.GraphQueryBuilder
– Built for generating GraphQL queries and retrieving documents. It wraps the TypeQueryBuilder class for multiple types query.ContentGraphResult
– Wraps the response, including search results and errors that are returned from Optimizely Content Graph. Because content types are dynamic, you should get the result of a type by using theGetContent<T>
method or using theGetContent<TSource,TDestination>
method for casting content type.ContentGraphHits
– Wraps the data of a type such as hits, facets, autocomplete, cursor, and total items.
Manage the Optimizely Graph .NET Client instance (query builder)
You can inject the Optimizely Graph query builder into your controller:
private GraphQueryBuilder queryBuilder;
public SearchPageController(GraphQueryBuilder builder)
{
queryBuilder = builder;
}
Or it can be initialized manually:
var client = GraphQueryBuilder.CreateFromConfig();
Updated about 2 months ago