Skip to content

Instantly share code, notes, and snippets.

View lssweatherhead's full-sized avatar

Laura Weatherhead lssweatherhead

View GitHub Profile
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 August 18, 2019 21:13
Code excerpts from Umbraco GraphQL Custom Data Sections
[TableName("ItemTypes")]
[PrimaryKey("Id", autoIncrement = true)]
[ExplicitColumns]
public class ItemType
{
[Column("Id")]
[PrimaryKeyColumn(AutoIncrement = true)]
public int Id { get; set; }
[Column("Name")]