@@ -79,7 +79,7 @@ Now, that we have some base classes for our mutation let us start to reorganize
79
79
80
80
namespace ConferencePlanner .GraphQL .Speakers
81
81
{
82
- [ExtendObjectType (Name = " Mutation" )]
82
+ [ExtendObjectType (" Mutation" )]
83
83
public class SpeakerMutations
84
84
{
85
85
[UseApplicationDbContext ]
@@ -584,7 +584,7 @@ We will start by adding the rest of the DataLoader that we will need. Then we wi
584
584
585
585
1 . Move the `Query .cs ` to the `Speakers ` directory and rename it to `SpeakerQueries .cs `.
586
586
587
- 1 . Next , add the `[ExtendObjectType (Name = " Query" )]` on top of our `SpeakerQueries ` class. The code should now look like the following.
587
+ 1 . Next , add the `[ExtendObjectType (" Query" )]` on top of our `SpeakerQueries ` class. The code should now look like the following.
588
588
589
589
```csharp
590
590
using System.Collections.Generic;
@@ -599,7 +599,7 @@ We will start by adding the rest of the DataLoader that we will need. Then we wi
599
599
600
600
namespace ConferencePlanner .GraphQL .Speakers
601
601
{
602
- [ExtendObjectType (Name = " Query" )]
602
+ [ExtendObjectType (" Query" )]
603
603
public class SpeakerQueries
604
604
{
605
605
[UseApplicationDbContext ]
@@ -717,19 +717,20 @@ mkdir GraphQL/Sessions
717
717
718
718
namespace ConferencePlanner .GraphQL .Sessions
719
719
{
720
- public class AddSessionPayload : Payload
720
+ public class AddSessionPayload : SessionPayloadBase
721
721
{
722
- public AddSessionPayload (Session session )
722
+ public AddSessionPayload (UserError error )
723
+ : base (new [] { error })
723
724
{
724
- Session = session ;
725
725
}
726
726
727
- public AddSessionPayload (UserError error )
728
- : base (new [] { error })
727
+ public AddSessionPayload (Session session ) : base (session )
729
728
{
730
729
}
731
730
732
- public Session ? Session { get ; }
731
+ public AddSessionPayload (IReadOnlyList <UserError > errors ) : base (errors )
732
+ {
733
+ }
733
734
}
734
735
}
735
736
```
@@ -746,7 +747,7 @@ mkdir GraphQL/Sessions
746
747
747
748
namespace ConferencePlanner .GraphQL .Sessions
748
749
{
749
- [ExtendObjectType (Name = " Mutation" )]
750
+ [ExtendObjectType (" Mutation" )]
750
751
public class SessionMutations
751
752
{
752
753
[UseApplicationDbContext ]
@@ -1001,7 +1002,7 @@ mkdir GraphQL/Sessions
1001
1002
1002
1003
namespace ConferencePlanner .GraphQL .Tracks
1003
1004
{
1004
- [ExtendObjectType (Name = " Mutation" )]
1005
+ [ExtendObjectType (" Mutation" )]
1005
1006
public class TrackMutations
1006
1007
{
1007
1008
[UseApplicationDbContext ]
@@ -1141,7 +1142,7 @@ In this section, we will optimize our `Query` type by bringing in more fields to
1141
1142
1142
1143
namespace ConferencePlanner .GraphQL .Speakers
1143
1144
{
1144
- [ExtendObjectType (Name = " Query" )]
1145
+ [ExtendObjectType (" Query" )]
1145
1146
public class SpeakerQueries
1146
1147
{
1147
1148
[UseApplicationDbContext ]
@@ -1175,7 +1176,7 @@ In this section, we will optimize our `Query` type by bringing in more fields to
1175
1176
1176
1177
namespace ConferencePlanner .GraphQL .Speakers
1177
1178
{
1178
- [ExtendObjectType (Name = " Query" )]
1179
+ [ExtendObjectType (" Query" )]
1179
1180
public class SpeakerQueries
1180
1181
{
1181
1182
[UseApplicationDbContext ]
@@ -1213,7 +1214,7 @@ In this section, we will optimize our `Query` type by bringing in more fields to
1213
1214
1214
1215
namespace ConferencePlanner .GraphQL .Sessions
1215
1216
{
1216
- [ExtendObjectType (Name = " Query" )]
1217
+ [ExtendObjectType (" Query" )]
1217
1218
public class SessionQueries
1218
1219
{
1219
1220
[UseApplicationDbContext ]
@@ -1272,7 +1273,7 @@ In this section, we will optimize our `Query` type by bringing in more fields to
1272
1273
1273
1274
namespace ConferencePlanner .GraphQL .Tracks
1274
1275
{
1275
- [ExtendObjectType (Name = " Query" )]
1276
+ [ExtendObjectType (" Query" )]
1276
1277
public class TrackQueries
1277
1278
{
1278
1279
[UseApplicationDbContext ]
0 commit comments