You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the EF examples (in EntityFrameworkExecutionTests for instance), you're using context.SaveChanges() inside your "addMutate" mutation meaning your mutation parameter in the schema.AddMutation(...) signature can just be synchronous. What if you want to use context.SaveChangesAsync() though? Or, in my situation with CosmosDB, what if your underlying data storage API only has async methods?
Seems like I can add async to the mutation and await the CosmosDB call, but then I have to force blocking for .Result.
The queryableGetter can't be marked as async as Async lambda expressions cannot be converted into expression trees.
(Worth noting that using a method body won't fit anyway as it also can't be converted to an expression tree).
I get that the mutation has to happen and be waited on before the retrieval query can fire after, but I'm just wondering whether you can have overloads for AddMutation that support async?
The text was updated successfully, but these errors were encountered:
In the EF examples (in
EntityFrameworkExecutionTests
for instance), you're usingcontext.SaveChanges()
inside your"addMutate"
mutation meaning your mutation parameter in theschema.AddMutation(...)
signature can just be synchronous. What if you want to usecontext.SaveChangesAsync()
though? Or, in my situation with CosmosDB, what if your underlying data storage API only has async methods?Seems like I can add
async
to the mutation and await the CosmosDB call, but then I have to force blocking for.Result
.The queryableGetter can't be marked as async as
Async lambda expressions cannot be converted into expression trees
.(Worth noting that using a method body won't fit anyway as it also can't be converted to an expression tree).
I get that the mutation has to happen and be waited on before the retrieval query can fire after, but I'm just wondering whether you can have overloads for
AddMutation
that support async?The text was updated successfully, but these errors were encountered: