Movatterモバイル変換


[0]ホーム

URL:


Dev guideRecipesAPI ReferenceChangelog
Dev guideRecipesUser GuidesNuGetDev CommunityOptimizely AcademySubmit a ticketLog InCross-platform products
Dev guide
All
Pages
Start typing to search…

Joins with link

How to create joins on items within and across content types.

Items are instances of content types. You can join items from the same or other content types within or across sources in a single Optimizely Graph query bylinking them with different connection types. This makes it possible to query your content as a graph, although still represented as a hierarchy due to the nature of GraphQL.

Before you create a link query, you should configure your content types in the schema. Seeconfiguration of links.

Use theLink method to create the link query:

var linkQuery = new LinkQueryBuilder<BiographyPage>().WithLinkType("MyCustomLinkType").Fields(x=>x.Name);var query = queryBuilder.OperationName("MyQuery").ForType<StartPage>().Fields(x=>x.Name).Total().Link(linkQuery);var rawData = await query.GetRawResultAsync();var content = //convert rawData to your content

TheLink query's response is very dynamic. You should convert the JSON response to the data objects by yourself. UseGetRawResultAsync to get raw data as a string.

Updated 22 days ago



[8]ページ先頭

©2009-2025 Movatter.jp