File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
CarvedRock/CarvedRock.Api/GraphQL/Types Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,12 @@ public ProductType()
10
10
Field ( t => t . Id ) ;
11
11
Field ( t => t . Name ) ;
12
12
Field ( t => t . Description ) ;
13
+ Field ( t => t . IntroducedAt ) . Description ( "When the product was first introduced in the catalog" ) ;
14
+ Field ( t => t . PhotoFileName ) . Description ( "The file name of the photo so the client can render it" ) ;
15
+ Field ( t => t . Price ) ;
16
+ Field ( t => t . Rating ) . Description ( "The (max 5) star customer rating" ) ;
17
+ Field ( t => t . Stock ) ;
18
+ Field < ProductTypeEnumType > ( "Type" , "The type of product" ) ;
13
19
}
14
20
}
15
21
}
Original file line number Diff line number Diff line change
1
+ using CarvedRock . Api . Data ;
2
+ using GraphQL . Types ;
3
+
4
+ namespace CarvedRock . Api . GraphQL . Types
5
+ {
6
+ public class ProductTypeEnumType : EnumerationGraphType < ProductTypeEnum >
7
+ {
8
+ public ProductTypeEnumType ( )
9
+ {
10
+ Name = "Type" ;
11
+ Description = "The type of product" ;
12
+ }
13
+ }
14
+ }
You can’t perform that action at this time.
0 commit comments