Repository navigation
Conversation
… a data fetcher
| resolvedType = (GraphQLObjectType) fieldType; | ||
| } | ||
|
|
||
| Map<String, List<Field>> subFields = new LinkedHashMap<>(); |
There was a problem hiding this comment.
Notice how visitedFragments is NEVER used. Thats why I took it out of the public method signature
| } | ||
|
|
||
|
|
||
| private void collectFields(ExecutionContext executionContext, GraphQLObjectType type, SelectionSet selectionSet, List<String> visitedFragments, Map<String, List<Field>> fields) { |
There was a problem hiding this comment.
I can make this public again but I figured 3.x and breaking changes and its unlikely to break ANYONE really
|
@kaqqao - this helps solve your selection problem. I think all the parts are now in place |
bbakerman
left a comment
There was a problem hiding this comment.
Atlassian needs the ability to "proxy" a field down to a backing graphql server. This will allow that
| /** | ||
| * @return the {@link ExecutionContext} for the current operation | ||
| */ | ||
| ExecutionContext getExecutionContext(); |
There was a problem hiding this comment.
To use FieldCollector in a DataFetcher, I need the ExecutionContext.
There was a problem hiding this comment.
@bbakerman Does this mean ExecutionContext is now part of the public API?
There was a problem hiding this comment.
I have taken this out now as being API and made a new wrapper of the bits we need
…on-in-data-fetchers # Conflicts: # src/main/java/graphql/execution/batched/BatchedExecutionStrategy.java
|
Commented on #377 about the idea I had for |
Thats brilliant - yes that what we should do. Have an API wrapper for field collector and leave all the plumbing to the internals. |
|
I agree with @bbakerman sounds good. 👍 |
…d collector doesnt NOT have to be API
|
OK so I have created a DataFetcherSelectionSet interface so we can hide the details of how to get the selection set of fields from consumers. I used a supplier interface for DataFetchingFieldSelectionSet so that it can be lazy. If you dont want the "selection set" of fields then it wont evaluate them. |
…on-in-data-fetchers # Conflicts: # src/main/java/graphql/execution/FieldCollector.java
|
@bbakerman why is this a breaking change? |
|
Its a minor breaking change in that I refactored FieldCollector. Fiven that we dont expect consumers to consume FieldCollector its debtateable. |
#377 - have the ability to know and capture all fields in a data fetcher
This tweaks DataFetcher so it has the ExecutionContext available and FieldCollector to have a better public API