GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Stop creating NonNullableFieldValidator every for every object or list field by bbakerman · Pull Request #3929 · graphql-java/graphql-java Conversation
Member
Today we create a NonNullableFieldValidator for every list item and every object we encounter. We do this because the constructor took a ExecutionStepInfo which IF there was a problem was used say what field was in error BUT we dont need this. It is passed into the So we can create 1 at execution time and use it through out This save nemory allocation for cases where you have lots of object fields and / or lost of list fields. This is NOT a breaking change - NonNullableFieldValidator is a internal class and this only changes the constructor shape
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
bbakerman
commented
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need for the executionStepInfo here. Its passed in during So this instance gets used for the entirety of the operation
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
bbakerman
commented
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no need to recreate it
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
bbakerman
commented
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see - executionStepInfo is in the ExecutionStrategyParameters always
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
bbakerman
commented
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need - same reason
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
bbakerman
commented
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just to be more specific - this helped find tests that "half create" objects for testing reasons
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
bbakerman
commented
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Subscriptions is a special case - because it starts a new ExecutionContext instance - So we do re-create it here - but only once - not per published message
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
bbakerman
commented
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The rest of the changes are test fixups where they half create support objects with just enough brains to work
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
There was an error while loading. Please reload this page.
Test Results 314 files ±0 314 suites ±0 52s ⏱️ -2s Results for commit 80f4a3b. ± Comparison against base commit 397c050. This pull request removes 174 and adds 152 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…ullableFieldValidator-all-the-time # Conflicts: # src/main/java/graphql/execution/ExecutionStrategy.java # src/main/java/graphql/execution/SubscriptionExecutionStrategy.java
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.