I’m spending a lot (read: “waaay to many”) time learning GraphQL. One of the things I had to figure out was how to call an async method inside a field resolver.
You have 2 options:
- Option 1 - Use the Field<> method and return a Task:
- Option 2 – Use the FieldAsync<> method and await the result: