test: expand test suite for GraphQLResolveInfo in resolve functions#4698
test: expand test suite for GraphQLResolveInfo in resolve functions#4698tommyhgunz14 wants to merge 1 commit into
Conversation
Closes graphql#351 Adds comprehensive tests for the GraphQLResolveInfo parameter across all three functions that receive it: - Field resolvers: tests for nested fields, NonNull/List return type wrappers, fieldNodes with aliases and arguments, fragments, path for deeply nested fields, and variableValues/operation info - resolveType: tests that interface and union resolveType callbacks receive correct fieldName, fieldNodes, returnType, and parentType - isTypeOf: tests that isTypeOf receives correct resolve info Previously, only rootValue was tested from GraphQLResolveInfo.
|
|
|
@tommyhgunz14 is attempting to deploy a commit to the The GraphQL Foundation Team on Vercel. A member of the Team first needs to authorize it. |
|
@tommyhgunz14 Thanks for submitting these additional tests. We have 100% test coverage already in this repo, but that's just mechanical coverage by line, and doesn't necessarily mean that additional tests are unnecessary. In this particular case, I think we have sufficient coverage for GraphQLResolveInfo in combination with our TypeScript types and existing GraphQLResolveInfo tests, so I will close this PR. We nevertheless very much appreciate the interest in improving the code base! If you have in mind to continue to contribute, feel free to ping me on our Discord if that would be helpful, or opening up an issue to start a discussion about what gaps you would like to fill. Thanks again! |
|
@yaacovCR you're killing my sn73 credibility score, it had already taken a hit from some gold standard ones I pushed before I understood the tiering system. What am I supposed to do to make sure I'm not resolving issues that you're not interested in please. |
|
I failed to read your PR closely enough, I didn't see that this closes: Not only was there a pre-existing issue discussing this, it was marked as "help wanted" by @leebyron himself. :) So reopening. :) Having said that, please make a few changes:
we have some tests for resolveInfo in a few places: https://github.com/graphql/graphql-js/blob/17.x.x/src/execution/__tests__/executor-test.ts#L226-L379 and also
Apologies, happy coding! |
Also, what is this in reference to? I searched, but could not find. Is anything else stalled? |
|
Hi - wasnt sure which one you wanted to persist, I've created this to address your feedback sir. #4764 |
|
let's use the other PR as that has the best base already.
Circling back to this, still not sure what this is in reference to. :) |
|
Closing in favor of #4764 |
Closes #351
Adds comprehensive tests for the GraphQLResolveInfo parameter across all three functions that receive it:
Previously, only rootValue was tested from GraphQLResolveInfo.