Skip to content

Conversation

@bbakerman
Copy link
Member

This gives us the ability to get to query directives from ENFs

@bbakerman bbakerman added this to the 21.0 milestone Dec 7, 2022
};

for (ExecutableNormalizedField topLevel : collectFromOperationResult.children) {
ImmutableList<FieldAndAstParent> mergedField = collectFromOperationResult.normalizedFieldToAstFields.get(topLevel);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed this list to a better name - because its not a mergedField

ImmutableList<FieldAndAstParent> childFieldAndAstParents = nextLevel.normalizedFieldToAstFields.get(child);

MergedField mergedField = newMergedField(map(childFieldAndAstParents, fieldAndAstParent -> fieldAndAstParent.field)).build();
captureMergedField.accept(child, mergedField);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the consumer cause the side effect of putting the ENF into map along with the QueryDirectives

This save having to pass in all the extra parameters needed

I think its a neat side effect trick

normalizedFieldToQueryDirectives.put(enf, queryDirectives);
normalizedFieldToMergedField.put(enf, mergedFld);
};

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This conumer is the side effect to create QueryDirectives and also to capture enf -> mergedField

collectInlineFragment(parameters, result, (InlineFragment) selection, possibleObjects, astTypeCondition);
} else if (selection instanceof FragmentSpread) {
collectFragmentSpread(parameters, result, (FragmentSpread) selection, possibleObjects, astTypeCondition);
collectFragmentSpread(parameters, result, (FragmentSpread) selection, possibleObjects);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

never used

List types = ((GraphQLUnionType) type).getTypes();
return ImmutableSet.copyOf(types);
List<GraphQLNamedOutputType> unionTypes = ((GraphQLUnionType) type).getTypes();
return ImmutableSet.copyOf(ImmutableKit.map(unionTypes, GraphQLObjectType.class::cast));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix up to remove warnings around List without generics

@bbakerman bbakerman requested review from andimarek and dondonz and removed request for andimarek January 30, 2023 01:08
CoercedVariables coercedVariableValues,
@Nullable Map<String, NormalizedInputValue> normalizedVariableValues) {
@Nullable Map<String, NormalizedInputValue> normalizedVariableValues,
GraphQLContext graphQLContext, Locale locale) {
Copy link
Member

@dondonz dondonz Feb 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: can you push Locale locale to the next line?

@dondonz dondonz modified the milestones: 21.0, 20.1 Feb 15, 2023
@andimarek andimarek modified the milestones: April 2023, July 2023 Mar 21, 2023
@bbakerman bbakerman added this pull request to the merge queue Apr 13, 2023
Merged via the queue into master with commit e5ca8cb Apr 13, 2023
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.

4 participants