| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| Expand Up | @@ -607,10 +607,7 @@ private FieldValueInfo completeField(GraphQLFieldDefinition fieldDef, ExecutionC | |
| instrumentationParams, executionContext.getInstrumentationState() | ||
| )); | ||
|
|
||
| NonNullableFieldValidator nonNullableFieldValidator = new NonNullableFieldValidator(executionContext, executionStepInfo); | ||
|
Comment thread
Copy link
Copy Markdown
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. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Qualityno need to recreate it
Sorry, something went wrong.
All reactions
|
||
|
|
||
| ExecutionStrategyParameters newParameters = parameters.transform(executionStepInfo, | ||
| nonNullableFieldValidator, | ||
| fetchedValue.getLocalContext(), | ||
| fetchedValue.getFetchedValue()); | ||
|
|
||
| Expand Down Expand Up | @@ -769,13 +766,12 @@ protected FieldValueInfo completeValueForList(ExecutionContext executionContext, | |
|
|
||
| ExecutionStepInfo stepInfoForListElement = executionStepInfoFactory.newExecutionStepInfoForListElement(executionStepInfo, indexedPath); | ||
|
|
||
| NonNullableFieldValidator nonNullableFieldValidator = new NonNullableFieldValidator(executionContext, stepInfoForListElement); | ||
|
|
||
|
Comment thread
Copy link
Copy Markdown
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. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityNo need - same reason
Sorry, something went wrong.
All reactions
|
||
| FetchedValue value = unboxPossibleDataFetcherResult(executionContext, parameters, item); | ||
|
|
||
| ExecutionStrategyParameters newParameters = parameters.transform(stepInfoForListElement, | ||
| nonNullableFieldValidator, indexedPath, | ||
| value.getLocalContext(), value.getFetchedValue()); | ||
| indexedPath, | ||
| value.getLocalContext(), | ||
| value.getFetchedValue()); | ||
|
|
||
| fieldValueInfos.add(completeValue(executionContext, newParameters)); | ||
| index++; | ||
| Expand Down Expand Up | @@ -914,10 +910,8 @@ protected Object completeValueForObject(ExecutionContext executionContext, Execu | |
| ); | ||
|
|
||
| ExecutionStepInfo newExecutionStepInfo = executionStepInfo.changeTypeWithPreservedNonNull(resolvedObjectType); | ||
| NonNullableFieldValidator nonNullableFieldValidator = new NonNullableFieldValidator(executionContext, newExecutionStepInfo); | ||
|
|
||
| ExecutionStrategyParameters newParameters = parameters.transform(newExecutionStepInfo, | ||
| nonNullableFieldValidator, | ||
| subFields, | ||
| result); | ||
|
|
||
| Expand Down | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| Expand Up | @@ -38,7 +38,7 @@ private ExecutionStrategyParameters(ExecutionStepInfo executionStepInfo, | |
| this.localContext = localContext; | ||
| this.fields = assertNotNull(fields, () -> "fields is null"); | ||
| this.source = source; | ||
| this.nonNullableFieldValidator = nonNullableFieldValidator; | ||
| this.nonNullableFieldValidator = assertNotNull(nonNullableFieldValidator, () -> "requires a NonNullValidator");; | ||
|
Comment thread
Copy link
Copy Markdown
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. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityJust to be more specific - this helped find tests that "half create" objects for testing reasons
Sorry, something went wrong.
All reactions
|
||
| this.path = path; | ||
| this.currentField = currentField; | ||
| this.parent = parent; | ||
| Expand Down Expand Up | @@ -132,7 +132,6 @@ ExecutionStrategyParameters transform(MergedField currentField, | |
|
|
||
| @Internal | ||
| ExecutionStrategyParameters transform(ExecutionStepInfo executionStepInfo, | ||
| NonNullableFieldValidator nonNullableFieldValidator, | ||
| MergedSelectionSet fields, | ||
| Object source) { | ||
| return new ExecutionStrategyParameters(executionStepInfo, | ||
| Expand All | @@ -148,7 +147,6 @@ ExecutionStrategyParameters transform(ExecutionStepInfo executionStepInfo, | |
|
|
||
| @Internal | ||
| ExecutionStrategyParameters transform(ExecutionStepInfo executionStepInfo, | ||
| NonNullableFieldValidator nonNullableFieldValidator, | ||
| ResultPath path, | ||
| Object localContext, | ||
| Object source) { | ||
| Expand All | @@ -165,7 +163,6 @@ ExecutionStrategyParameters transform(ExecutionStepInfo executionStepInfo, | |
|
|
||
| @Internal | ||
| ExecutionStrategyParameters transform(ExecutionStepInfo executionStepInfo, | ||
| NonNullableFieldValidator nonNullableFieldValidator, | ||
| Object localContext, | ||
| Object source) { | ||
| return new ExecutionStrategyParameters(executionStepInfo, | ||
| Expand Down | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| Expand Up | @@ -117,6 +117,7 @@ abstract class AsyncExecutionStrategyTest extends Specification { | |
| .newParameters() | ||
| .executionStepInfo(typeInfo) | ||
| .fields(mergedSelectionSet(['hello': mergedField([Field.newField('hello').build()]), 'hello2': mergedField([Field.newField('hello2').build()])])) | ||
| .nonNullFieldValidator(new NonNullableFieldValidator(executionContext)) | ||
|
Comment thread
Copy link
Copy Markdown
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. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityThe rest of the changes are test fixups where they half create support objects with just enough brains to work
Sorry, something went wrong.
All reactions
|
||
| .build() | ||
|
|
||
| AsyncExecutionStrategy asyncExecutionStrategy = new AsyncExecutionStrategy() | ||
| Expand Down Expand Up | @@ -160,6 +161,7 @@ abstract class AsyncExecutionStrategyTest extends Specification { | |
| .newParameters() | ||
| .executionStepInfo(typeInfo) | ||
| .fields(mergedSelectionSet(['hello': mergedField([Field.newField('hello').build()]), 'hello2': mergedField([Field.newField('hello2').build()])])) | ||
| .nonNullFieldValidator(new NonNullableFieldValidator(executionContext)) | ||
| .build() | ||
|
|
||
| AsyncExecutionStrategy asyncExecutionStrategy = new AsyncExecutionStrategy() | ||
| Expand Down Expand Up | @@ -205,6 +207,7 @@ abstract class AsyncExecutionStrategyTest extends Specification { | |
| .newParameters() | ||
| .executionStepInfo(typeInfo) | ||
| .fields(mergedSelectionSet(['hello': mergedField([Field.newField('hello').build()]), 'hello2': mergedField([Field.newField('hello2').build()])])) | ||
| .nonNullFieldValidator(new NonNullableFieldValidator(executionContext)) | ||
| .build() | ||
|
|
||
| AsyncExecutionStrategy asyncExecutionStrategy = new AsyncExecutionStrategy() | ||
| Expand Down Expand Up | @@ -249,6 +252,7 @@ abstract class AsyncExecutionStrategyTest extends Specification { | |
| .newParameters() | ||
| .executionStepInfo(typeInfo) | ||
| .fields(mergedSelectionSet(['hello': mergedField([Field.newField('hello').build()]), 'hello2': mergedField([Field.newField('hello2').build()])])) | ||
| .nonNullFieldValidator(new NonNullableFieldValidator(executionContext)) | ||
| .build() | ||
|
|
||
| AsyncExecutionStrategy asyncExecutionStrategy = new AsyncExecutionStrategy() | ||
| Expand Down Expand Up | @@ -312,6 +316,7 @@ abstract class AsyncExecutionStrategyTest extends Specification { | |
| .newParameters() | ||
| .executionStepInfo(typeInfo) | ||
| .fields(mergedSelectionSet(['hello': mergedField([new Field('hello')]), 'hello2': mergedField([new Field('hello2')])])) | ||
| .nonNullFieldValidator(new NonNullableFieldValidator(executionContext)) | ||
| .build() | ||
|
|
||
| AsyncExecutionStrategy asyncExecutionStrategy = new AsyncExecutionStrategy() | ||
| Expand Down | ||
| Back | FazBrowse Home | New Git URL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityNo need for the executionStepInfo here. Its passed in during validate
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.