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
|
services
|
||||||
.AddGraphQLServer()
|
.AddGraphQLServer()
|
||||||
|
.AddProjections()
|
||||||
.AddQueryType(d => d.Name("Query"))
|
.AddQueryType(d => d.Name("Query"))
|
||||||
.AddPoweredSoftQueries()
|
.AddPoweredSoftQueries()
|
||||||
.AddPoweredSoftDynamicQueries()
|
.AddPoweredSoftDynamicQueries()
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="HotChocolate" Version="11.0.9" />
|
<PackageReference Include="HotChocolate" Version="11.0.9" />
|
||||||
|
<PackageReference Include="HotChocolate.Data" Version="11.0.9" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -36,12 +36,14 @@ namespace PoweredSoft.CQRS.GraphQL.HotChocolate
|
|||||||
if (q.QueryResultType.Namespace == "System.Linq" && q.QueryResultType.Name.Contains("IQueryable"))
|
if (q.QueryResultType.Namespace == "System.Linq" && q.QueryResultType.Name.Contains("IQueryable"))
|
||||||
{
|
{
|
||||||
//waiting on answer to be determined.
|
//waiting on answer to be determined.
|
||||||
/*var genericArgument = q.QueryResultType.GetGenericArguments().First();
|
//this does not work
|
||||||
var type = new ListType(new NonNullType(new NamedTypeNode));
|
//var genericArgument = q.QueryResultType.GetGenericArguments().First();
|
||||||
queryField.Type(type);
|
//var objectTypeOfAargument = typeof(ObjectType<>).MakeGenericType(genericArgument);
|
||||||
queryField.UsePaging();
|
//var listType = typeof(ListType<>).MakeGenericType(objectTypeOfAargument);
|
||||||
*/
|
//queryField.Type(objectTypeOfAargument);
|
||||||
|
//queryField.UseSingleOrDefault();
|
||||||
|
//queryField.UseProjection();
|
||||||
|
////queryField.UsePaging(listType);
|
||||||
queryField.Type(q.QueryResultType);
|
queryField.Type(q.QueryResultType);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user