|
|
|
@ -15,14 +15,14 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types |
|
|
|
{ |
|
|
|
public ContentInterfaceGraphType() |
|
|
|
{ |
|
|
|
Name = $"Content"; |
|
|
|
Name = "Content"; |
|
|
|
|
|
|
|
AddField(new FieldType |
|
|
|
{ |
|
|
|
Name = "id", |
|
|
|
ResolvedType = AllTypes.NonNullGuid, |
|
|
|
Resolver = Resolve(x => x.Id), |
|
|
|
Description = $"The id of the content." |
|
|
|
Description = "The id of the content." |
|
|
|
}); |
|
|
|
|
|
|
|
AddField(new FieldType |
|
|
|
@ -30,7 +30,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types |
|
|
|
Name = "version", |
|
|
|
ResolvedType = AllTypes.NonNullInt, |
|
|
|
Resolver = Resolve(x => x.Version), |
|
|
|
Description = $"The version of the content." |
|
|
|
Description = "The version of the content." |
|
|
|
}); |
|
|
|
|
|
|
|
AddField(new FieldType |
|
|
|
@ -38,7 +38,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types |
|
|
|
Name = "created", |
|
|
|
ResolvedType = AllTypes.NonNullDate, |
|
|
|
Resolver = Resolve(x => x.Created), |
|
|
|
Description = $"The date and time when the content has been created." |
|
|
|
Description = "The date and time when the content has been created." |
|
|
|
}); |
|
|
|
|
|
|
|
AddField(new FieldType |
|
|
|
@ -46,7 +46,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types |
|
|
|
Name = "createdBy", |
|
|
|
ResolvedType = AllTypes.NonNullString, |
|
|
|
Resolver = Resolve(x => x.CreatedBy.ToString()), |
|
|
|
Description = $"The user that has created the content." |
|
|
|
Description = "The user that has created the content." |
|
|
|
}); |
|
|
|
|
|
|
|
AddField(new FieldType |
|
|
|
@ -54,7 +54,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types |
|
|
|
Name = "lastModified", |
|
|
|
ResolvedType = AllTypes.NonNullDate, |
|
|
|
Resolver = Resolve(x => x.LastModified), |
|
|
|
Description = $"The date and time when the content has been modified last." |
|
|
|
Description = "The date and time when the content has been modified last." |
|
|
|
}); |
|
|
|
|
|
|
|
AddField(new FieldType |
|
|
|
@ -62,7 +62,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types |
|
|
|
Name = "lastModifiedBy", |
|
|
|
ResolvedType = AllTypes.NonNullString, |
|
|
|
Resolver = Resolve(x => x.LastModifiedBy.ToString()), |
|
|
|
Description = $"The user that has updated the content last." |
|
|
|
Description = "The user that has updated the content last." |
|
|
|
}); |
|
|
|
|
|
|
|
AddField(new FieldType |
|
|
|
@ -70,7 +70,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types |
|
|
|
Name = "status", |
|
|
|
ResolvedType = AllTypes.NonNullString, |
|
|
|
Resolver = Resolve(x => x.Status.Name.ToUpperInvariant()), |
|
|
|
Description = $"The the status of the content." |
|
|
|
Description = "The the status of the content." |
|
|
|
}); |
|
|
|
|
|
|
|
AddField(new FieldType |
|
|
|
@ -78,10 +78,10 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types |
|
|
|
Name = "statusColor", |
|
|
|
ResolvedType = AllTypes.NonNullString, |
|
|
|
Resolver = Resolve(x => x.StatusColor), |
|
|
|
Description = $"The color status of the content." |
|
|
|
Description = "The color status of the content." |
|
|
|
}); |
|
|
|
|
|
|
|
Description = $"The structure of all content types."; |
|
|
|
Description = "The structure of all content types."; |
|
|
|
} |
|
|
|
|
|
|
|
private static IFieldResolver Resolve(Func<IEnrichedContentEntity, object> action) |
|
|
|
|