this dosent work, but i will leave it here to explore later.
This commit is contained in:
parent
d68f87028d
commit
764f4a7cd6
@ -62,6 +62,7 @@ namespace Demo
|
||||
|
||||
services
|
||||
.AddGraphQLServer()
|
||||
.AddProjections()
|
||||
.AddQueryType(d => d.Name("Query"))
|
||||
.AddPoweredSoftQueries()
|
||||
.AddPoweredSoftDynamicQueries()
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="HotChocolate" Version="11.0.9" />
|
||||
<PackageReference Include="HotChocolate.Data" Version="11.0.9" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -36,12 +36,14 @@ namespace PoweredSoft.CQRS.GraphQL.HotChocolate
|
||||
if (q.QueryResultType.Namespace == "System.Linq" && q.QueryResultType.Name.Contains("IQueryable"))
|
||||
{
|
||||
//waiting on answer to be determined.
|
||||
/*var genericArgument = q.QueryResultType.GetGenericArguments().First();
|
||||
var type = new ListType(new NonNullType(new NamedTypeNode));
|
||||
queryField.Type(type);
|
||||
queryField.UsePaging();
|
||||
*/
|
||||
|
||||
//this does not work
|
||||
//var genericArgument = q.QueryResultType.GetGenericArguments().First();
|
||||
//var objectTypeOfAargument = typeof(ObjectType<>).MakeGenericType(genericArgument);
|
||||
//var listType = typeof(ListType<>).MakeGenericType(objectTypeOfAargument);
|
||||
//queryField.Type(objectTypeOfAargument);
|
||||
//queryField.UseSingleOrDefault();
|
||||
//queryField.UseProjection();
|
||||
////queryField.UsePaging(listType);
|
||||
queryField.Type(q.QueryResultType);
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user