Skip to content

Instantly share code, notes, and snippets.

Avatar

Laura Weatherhead lssweatherhead

View GitHub Profile
View CarbonFootprintCategoryGraphType.cs
public class CarbonFootprintCategoryGraphType : ObjectGraphType<ItemType>
{
public CarbonFootprintCategoryGraphType()
{
Name = "CarbonFootprintCategory";
Field<NonNullGraphType<IntGraphType>>(
"id",
resolve: context => context.Source.Id
);
Field<NonNullGraphType<StringGraphType>>(
@lssweatherhead
lssweatherhead / DataModels.cs
Last active Aug 18, 2019
Code excerpts from Umbraco GraphQL Custom Data Sections
View DataModels.cs
[TableName("ItemTypes")]
[PrimaryKey("Id", autoIncrement = true)]
[ExplicitColumns]
public class ItemType
{
[Column("Id")]
[PrimaryKeyColumn(AutoIncrement = true)]
public int Id { get; set; }
[Column("Name")]
You can’t perform that action at this time.