Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
lukemurray committed Nov 28, 2023
1 parent 9497644 commit 9b4ffe3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Description>Tests for dotnet-gqlgen</Description>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public async Task<GqlResult<TQuery>> QueryAsync<TQuery>(Expression<Func<RootQuer

public async Task<GqlResult<TQuery>> MutateAsync<TQuery>(Expression<Func<Mutation, TQuery>> query)
{
var gql = base.MakeQuery<Mutation, TQuery>(query, true);
var gql = base.MakeQuery<Mutation, TQuery>(query, "TestMutation", true);
return await ProcessResult<TQuery>(gql);
}
}
Expand Down
20 changes: 10 additions & 10 deletions src/tests/DotNetGraphQLQueryGen.Tests/TestMakeQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ public class TestClient : TestHttpClient
{
internal QueryRequest MakeQuery<TReturn>(Expression<Func<RootQuery, TReturn>> p, bool mutation = false)
{
return base.MakeQuery(p, mutation);
return base.MakeQuery(p, "TestQuery", mutation);
}
internal QueryRequest MakeMutation<TReturn>(Expression<Func<Mutation, TReturn>> p, bool mutation = false)
{
return base.MakeQuery(p, mutation);
return base.MakeQuery(p, "TestQuery", mutation);
}
}

Expand All @@ -36,7 +36,7 @@ public void SimpleArgs()
s.Id,
}),
});
Assert.Equal($@"query BaseGraphQLClient {{
Assert.Equal($@"query TestQuery {{
Movies: movies {{
Id: id
}}
Expand All @@ -53,7 +53,7 @@ public void SimpleQuery()
DirectorOf = s.DirectorOf(),
}),
});
Assert.Equal($@"query BaseGraphQLClient {{
Assert.Equal($@"query TestQuery {{
Actors: actors {{
Id: id
DirectorOf: directorOf {{
Expand All @@ -76,7 +76,7 @@ public void MethodWithScalarReturn()
var query = client.MakeQuery(_ => new {
displayName = _.GetDisplayName(1)
});
Assert.Equal($@"query BaseGraphQLClient {{
Assert.Equal($@"query TestQuery {{
displayName: getDisplayName(id: 1)
}}", query.Query, ignoreLineEndingDifferences: true);
}
Expand All @@ -93,7 +93,7 @@ public void TypedClass()
Id = s.Id,
}),
});
Assert.Equal($@"query BaseGraphQLClient {{
Assert.Equal($@"query TestQuery {{
Movies: movies {{
Id: id
}}
Expand All @@ -111,7 +111,7 @@ public void TestMutationWithDate()
s.Id,
}),
}, true);
Assert.Equal($@"mutation BaseGraphQLClient {{
Assert.Equal($@"mutation TestQuery {{
Movie: addMovie(name: ""movie"", rating: 5.5, released: ""2019-10-30T17:55:23.0000000"") {{
Id: id
}}
Expand All @@ -130,7 +130,7 @@ public void TestArrayArg()
s.Id,
}),
});
Assert.Equal($@"query BaseGraphQLClient($a0: [Int]) {{
Assert.Equal($@"query TestQuery ($a0: [Int]) {{
Movies: moviesByIds(ids: $a0) {{
Id: id
}}
Expand All @@ -150,7 +150,7 @@ public void TestArrayArgExprInited()
s.Id,
}),
});
Assert.Equal($@"query BaseGraphQLClient($a0: [Int]) {{
Assert.Equal($@"query TestQuery ($a0: [Int]) {{
Movies: moviesByIds(ids: $a0) {{
Id: id
}}
Expand All @@ -171,7 +171,7 @@ public void TestComplexValueArg()
s.LastName
}),
});
Assert.Equal($@"query BaseGraphQLClient {{
Assert.Equal($@"query TestQuery {{
Producers: producers(filter: {{ field: ""lastName"", value: ""Lucas"" }}) {{
Id: id
LastName: lastName
Expand Down

0 comments on commit 9b4ffe3

Please sign in to comment.