-
-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a type guard to distinguish between ResolveTree and FieldsByTypeName #849
Labels
Comments
Sure; go ahead and raise a PR for it. I'd soften the argument to |
Alright, thank you. I'll add it to my TODO list and I'll aim to do it ASAP. |
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature description
parseResolveInfo
return type isResolveTree | FieldsByTypeName | null | undefined
. You can get rid ofnull | undefined
with anif
condition but you're left withResolveTree | FieldsByTypeName
. The problem is thatsimplifyParsedResolveInfoFragmentWithType
expects aResolveTree
as its first argument. We need a way to tell them apart. Right now I'm using this:Motivating example
It's hard to use
simplifyParsedResolveInfoFragmentWithType
when using TypeScript without this type guard, unless I'm doing something wrong here.Supporting development
I [tick all that apply]:
The text was updated successfully, but these errors were encountered: