test: consolidate resolveInfo tests into dedicated resolveInfo-test.ts#4764
Open
tommyhgunz14 wants to merge 1 commit into
Open
test: consolidate resolveInfo tests into dedicated resolveInfo-test.ts#4764tommyhgunz14 wants to merge 1 commit into
tommyhgunz14 wants to merge 1 commit into
Conversation
|
@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. |
- Move 'provides info about current execution state' and 'populates path correctly with complex types' from executor-test.ts to resolveInfo-test.ts - Add new tests for nested fields, NonNull/List wrappers, fieldNodes with aliases and arguments, fragments, resolveType on interfaces and unions, isTypeOf, deeply nested paths, and variableValues - Add expectResolveInfo helper and captureInfo resolver for streamlined test assertions - Remove unused imports from executor-test.ts (GraphQLResolveInfo, GraphQLUnionType, Kind, promiseWithResolvers) - Target: 17.x.x branch - Reduces number of files testing resolveInfo (consolidated from executor-test.ts into a single dedicated file)
39f9039 to
949422e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Consolidate
GraphQLResolveInfotests intoresolveInfo-test.tsAddresses feedback from #4698 — consolidates scattered
resolveInfotests into a single dedicated file with a helper to streamline assertions.What changed
New file:
src/execution/__tests__/resolveInfo-test.tsexecutor-test.ts:parentType,returnType,fieldName)NonNull/Listwrapper types inreturnTypefieldNodeswith aliases and argumentsinfo.fragmentsresolveTypeon interfaces and unionsisTypeOfreceiving correct infopathfor deeply nested fieldsvariableValuesandoperationHelper utilities
expectResolveInfo()— executes a query and returns the capturedGraphQLResolveInfo, removing boilerplate from each testcaptureInfo()— reusable resolver that stores itsinfoargument for later assertionsCleanup in
executor-test.tsGraphQLResolveInfo,GraphQLUnionType,Kind,promiseWithResolvers)Result
executor-test.tsinto a single dedicated file)This is linked to test: expand test suite for GraphQLResolveInfo in resolve functions #4698