Open LemonTreeGitHub opened 2 years ago
Default UnityWebRequest does not implement GetAwaiter()
You need an extension for that. You can try
public class UnityWebRequestAwaiter : INotifyCompletion
{
private UnityWebRequestAsyncOperation asyncOp;
private Action continuation;
public UnityWebRequestAwaiter(UnityWebRequestAsyncOperation asyncOp)
{
this.asyncOp = asyncOp;
asyncOp.completed += OnRequestCompleted;
}
public bool IsCompleted { get { return asyncOp.isDone; } }
public void GetResult() { }
public void OnCompleted(Action continuation)
{
this.continuation = continuation;
}
private void OnRequestCompleted(AsyncOperation obj)
{
continuation();
}
}
public static class ExtensionMethods
{
public static UnityWebRequestAwaiter GetAwaiter(this UnityWebRequestAsyncOperation asyncOp)
{
return new UnityWebRequestAwaiter(asyncOp);
}
}
Hello,upon importing graphQL into Unity,i got error regarding this line
After that,i check out the demo,hitting the introspect link on both pokemon and user.Both get stuck on " API is being introspect, please wait" I even test it on a working project link and the bug remain
What should I do ?