Hi Team,
Please help me to identify and solve below issue -
GraphQlGetAsync giving exception “The app, schema or entity does not exist” in Squidex.ClientLibraray 14.2.0
stackTrace
at Squidex.ClientLibrary.Utils.SquidexClientBase.d__14.MoveNext()
at Squidex.ClientLibrary.Utils.SquidexClientBase.d__121.MoveNext() at Squidex.ClientLibrary.ContentsSharedClient
2.d__2`1.MoveNext()
at BBC.Studios.Virtual.Events.Infrastructure.Booths.ScheduleClient.d__4.MoveNext() in C:\projects\Microservices\bbc-studios-virtual-events\src\Infrastructure\Booths\ScheduleClient.cs:line 56
Nuget package - Squidex.ClientLibrary 14.2.0
Complete code as below
private readonly IContentsClient<Schedule, ScheduleData> scheduleClient;
private readonly IContentsSharedClient<Schedule, ScheduleData> scheduleSharedClient;
public ScheduleClient(ISquidexClientManager clientManager)
{
scheduleClient = clientManager.CreateContentsClient<Schedule, ScheduleData>("schedules");
scheduleSharedClient = clientManager.CreateSharedContentsClient<Schedule, ScheduleData>("schedules");
}
public async Task<IEnumerable<ScheduleSessions>> GetSchedules(ScheduleSearchModel scheduleSearchModel)
{
try
{
var query = GetScheduleReferencesGraphQlQuery(scheduleSearchModel);
var result = await scheduleSharedClient.GraphQlGetAsync<ScheduleItemResult>(query);
return result.QueryScheduleContents?.OrderBy(x => x.Data.Date).Select(MapToSessionItemModel).ToList();
}
catch(Exception ex)
{
return null;
}
}
private static object GetScheduleReferencesGraphQlQuery(ScheduleSearchModel model)
{
var contentQuery = new ContentQuery();
if (!string.IsNullOrWhiteSpace(model.Id))
{
contentQuery.Filter = $"id eq '{model.Id}'";
}
if (!string.IsNullOrWhiteSpace(model.EventId))
{
contentQuery.Filter = contentQuery.Filter == null
? $"data/EventId/iv eq '{model.EventId}'"
: $"{contentQuery.Filter} and data/EventId/iv eq '{model.EventId}'";
}
var participantQuery = new ContentQuery
{
Filter = $"data/ParticipantId/iv eq '{model.ParticipantId}'"
};
var query = new
{
query = @" query ContentsQuery($filter: String!, $orderby: String!, $filterParticipant: String!) {
querySchedulesContents(filter: $filter,orderby: $orderby) {
id
data {
eventId { iv} date {iv} timeZone {iv}
}
referencingBoothsContents{
id,
referencingBoothparticipantsContents(filter: $filterParticipant) {
id
data { participantId {iv} registrationDate {iv} status{iv} }
}
data{ name{iv} description{iv} start{iv} end{iv} registrationRequired{iv} allowParticipantToJoinBefore{iv} startedStatus{iv}
attendant {
iv {
email
}
}
}
}
referencingSessionsContents {
id
referencingSessionparticipantsContents(filter: $filterParticipant) {
id
data { participantId {iv} registrationDate {iv} status{iv} }
}
data { title {iv} description {iv} start {iv} end {iv} registrationRequired{iv} allowParticipantToJoinBefore{iv} startedStatus{iv}
moderator{
iv {
email
}
}
schedule{
iv {
id
}
}
speakers {
iv {
id
data {
name {
iv
}
eventId {
iv
}
jobTitle {
iv
}
companyName {
iv
}
description {
iv
}
thumbnail {
iv {
id
}
}
}
}
}
}
}
}
}",
variables = new
{
filter = contentQuery.Filter,
filterParticipant = participantQuery.Filter,
orderby = "data/Date/iv desc"
}
};
return query;
}