File tree Expand file tree Collapse file tree 4 files changed +20
-4
lines changed Expand file tree Collapse file tree 4 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 12
12
</PropertyGroup >
13
13
14
14
<ItemGroup >
15
- <PackageReference Include =" HotChocolate.AspNetCore" Version =" 12.5.0-preview.1 " />
16
- <PackageReference Include =" HotChocolate.Data.EntityFramework" Version =" 12.5.0-preview.1 " />
17
- <PackageReference Include =" HotChocolate.PersistedQueries.FileSystem" Version =" 12.5.0-preview.1 " />
15
+ <PackageReference Include =" HotChocolate.AspNetCore" Version =" 12.5.0-preview.7 " />
16
+ <PackageReference Include =" HotChocolate.Data.EntityFramework" Version =" 12.5.0-preview.7 " />
17
+ <PackageReference Include =" HotChocolate.PersistedQueries.FileSystem" Version =" 12.5.0-preview.7 " />
18
18
<PackageReference Include =" Microsoft.EntityFrameworkCore.Sqlite" Version =" 6.0.0" />
19
19
<PackageReference Include =" Microsoft.EntityFrameworkCore.Tools" Version =" 6.0.0" >
20
20
<IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
Original file line number Diff line number Diff line change @@ -84,6 +84,18 @@ public async Task<UploadSpeakerPhotoPayload> UploadSpeakerPhotoAsync(
84
84
new UserError ( "Speaker with id not found." , "SPEAKER_NOT_FOUND" ) ) ;
85
85
}
86
86
87
+ /*
88
+ if (input.Photo.Length < 1024_0000)
89
+ {
90
+ using (Stream inputStream = input.Photo.OpenReadStream())
91
+ {
92
+ using(Stream outputStream = File.)
93
+
94
+ await File.WriteAllBytesAsync(speaker.Id + ".png", );
95
+ }
96
+ }
97
+ */
98
+
87
99
return new UploadSpeakerPhotoPayload ( speaker ) ;
88
100
}
89
101
}
Original file line number Diff line number Diff line change
1
+ using ConferencePlanner . GraphQL . Data ;
1
2
using HotChocolate . Types ;
3
+ using HotChocolate . Types . Relay ;
2
4
3
5
namespace ConferencePlanner . GraphQL . Speakers
4
6
{
5
- public record UploadSpeakerPhotoInput ( int Id , IFile Photo ) ;
7
+ public record UploadSpeakerPhotoInput ( [ ID ( nameof ( Speaker ) ) ] int Id , IFile Photo ) ;
6
8
}
Original file line number Diff line number Diff line change @@ -14,5 +14,7 @@ public UploadSpeakerPhotoPayload(UserError error)
14
14
: base ( new [ ] { error } )
15
15
{
16
16
}
17
+
18
+
17
19
}
18
20
}
You can’t perform that action at this time.
0 commit comments