Skip to content

Commit

Permalink
Fixed upload scalar on SS (#5333)
Browse files Browse the repository at this point in the history
  • Loading branch information
PascalSenn authored Aug 23, 2022
1 parent 36c737b commit 7e49138
Show file tree
Hide file tree
Showing 3 changed files with 883 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ public static class OperationDescriptorMapper
{
public static void Map(ClientModel model, IMapperContext context)
{
var hasUpload = false;
foreach (OperationModel modelOperation in model.Operations)
{
var hasUpload = false;

var arguments = modelOperation.Arguments.Select(
arg =>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,5 +264,26 @@ scalar Upload
",
"extend schema @key(fields: \"id\")");
}

[Fact]
public void MultipleOperations_WithAndWithoutUpload()
{
AssertResult(
@"
query test(
$upload: Upload!
$string: String!) {
foo(string: $string upload: $upload)
}
query GetSomething { foo_bar_baz }
",
@"type Query {
foo_bar_baz: String
foo(string: String! upload: Upload!): String
}
scalar Upload
",
"extend schema @key(fields: \"id\")");
}
}
}
Loading

0 comments on commit 7e49138

Please sign in to comment.