Closed SleepySquash closed 9 months ago
Workaround I've discovered (until this is fixed):
GraphQLUploadType get objectGraphQLType => uploadGraphQLType;
...
@Mutation()
Future<Novel> uploadNovel(
Ctx ctx, {
required NovelId id,
required List<Object?> uploads,
}) async {
// use `uploads.cast<Upload>();`
}
Thanks for the issue! Could you try the latest leto_schema: ^0.0.1-dev.5
?
@juancastillo0, works perfectly, thanks 🎉
Thank you for the package, it's working great!
I've discovered that multiple
Upload
s currently throw aGraphQLError
due to type cast error, caused byleto_generator
.Let's say we have:
When running
leto_generator
, the following code is generated:And the line:
throws an error in runtime:
List<Object?>
is not subtype ofList<Upload>
in type cast.If that line is changed to:
or
then everything works flawlessly, uploads are successful.