Skip to content

Commit dbd48f2

Browse files
committed
Updated Packages
1 parent 9e1fe02 commit dbd48f2

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

code/complete/GraphQL/GraphQL.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
</PropertyGroup>
1313

1414
<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" />
1818
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.0" />
1919
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0">
2020
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

code/complete/GraphQL/Speakers/SpeakerMutations.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,18 @@ public async Task<UploadSpeakerPhotoPayload> UploadSpeakerPhotoAsync(
8484
new UserError("Speaker with id not found.", "SPEAKER_NOT_FOUND"));
8585
}
8686

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+
8799
return new UploadSpeakerPhotoPayload(speaker);
88100
}
89101
}
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
using ConferencePlanner.GraphQL.Data;
12
using HotChocolate.Types;
3+
using HotChocolate.Types.Relay;
24

35
namespace ConferencePlanner.GraphQL.Speakers
46
{
5-
public record UploadSpeakerPhotoInput(int Id, IFile Photo);
7+
public record UploadSpeakerPhotoInput([ID(nameof(Speaker))]int Id, IFile Photo);
68
}

code/complete/GraphQL/Speakers/UploadSpeakerPhotoPayload.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,7 @@ public UploadSpeakerPhotoPayload(UserError error)
1414
: base(new[] { error })
1515
{
1616
}
17+
18+
1719
}
1820
}

0 commit comments

Comments
 (0)