Replies: 1 comment
-
This is not possible with an What you can do is you can add a middleware that prints this out: public class Query
{
[Report]
[UseFiltering]
public IExecutable<Customer> GetCustomers() => new[]
{
new Customer()
{
Id = 1
},
new Customer()
{
Id = 2
}
}.AsExecutable();
}
public class ReportAttribute : ObjectFieldDescriptorAttribute
{
protected override void OnConfigure(
IDescriptorContext context, IObjectFieldDescriptor descriptor, MemberInfo member)
{
descriptor.Use(next => async context =>
{
await next(context);
if (context.Result is IExecutable executable)
{
Console.WriteLine(executable.Print());
}
});
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Having a filterable collection field with a resolver that returns IQueryable/IExecutable, shouldn't I be able to create an
ExecutionDiagnosticEventListener
so I can add a breakpoint/Print()
/ToString()
it for troubleshooting before it is executed? I don't know which method or which property on the context that would have the iexecutable with any queryable operations staged on it.Beta Was this translation helpful? Give feedback.
All reactions