Skip to content
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

correct rootValue in alias test #17

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tranvansang
Copy link

No description provided.

@clentfort
Copy link
Owner

Thanks for the PR. I'm a bit worried. Why does this test currently pass? Could you explain how you found this?

@tranvansang
Copy link
Author

tranvansang commented May 21, 2022

Why does this test currently pass?

I think the current test only asserts the number of calls to the converter.
It passed regardless of whatever the data is.

Could you explain how you found this?

I tried integrating your implementation into my (unpublished, urql-like) library, I iterated through all your test cases with an addition assertion of the returned result and found the mistake.

Eventually, I found that the current top-down approach (checking the type from the leaf element of the AST) in your lib cannot cover all the cases. Specifically when the tree has recursive fragments.

Currently, I am stopping my own implementation and might investigate an entirely new (bottom-up) implementation somewhere in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants