Class DataFetchingFieldSelectionSetImpl
- All Implemented Interfaces:
DataFetchingFieldSelectionSet
-
Method Summary
Modifier and TypeMethodDescriptionboolean
This will return true if the field selection set matches a specified "glob" pattern matching ie the glob pattern matching supported byFileSystem.getPathMatcher(java.lang.String)
.boolean
containsAllOf
(String fieldGlobPattern, String... fieldGlobPatterns) This will return true if the field selection set matches all of the specified "glob" pattern matches ie the glob pattern matching supported byFileSystem.getPathMatcher(java.lang.String)
.boolean
containsAnyOf
(String fieldGlobPattern, String... fieldGlobPatterns) This will return true if the field selection set matches any of the specified "glob" pattern matches ie the glob pattern matching supported byFileSystem.getPathMatcher(java.lang.String)
.This will return all selected fields.This will return a list of selected fields that match a specified "glob" pattern matching ie the glob pattern matching supported byFileSystem.getPathMatcher(java.lang.String)
.The result key of a selected field represents what the graphql return value will be.getFieldsGroupedByResultKey
(String fieldGlobPattern, String... fieldGlobPatterns) The result key of a selected field represents what the graphql return value will be.This will return all selected fields that are immediate child fields of the field being fetched.newCollector
(GraphQLSchema schema, GraphQLOutputType fieldType, Supplier<ExecutableNormalizedField> normalizedFieldSupplier) toString()
-
Method Details
-
newCollector
public static DataFetchingFieldSelectionSet newCollector(GraphQLSchema schema, GraphQLOutputType fieldType, Supplier<ExecutableNormalizedField> normalizedFieldSupplier) -
contains
Description copied from interface:DataFetchingFieldSelectionSet
This will return true if the field selection set matches a specified "glob" pattern matching ie the glob pattern matching supported byFileSystem.getPathMatcher(java.lang.String)
.This will allow you to use '*', '**' and '?' as special matching characters such that "invoice/customer*" would match an invoice field with child fields that start with 'customer'.
- Specified by:
contains
in interfaceDataFetchingFieldSelectionSet
- Parameters:
fieldGlobPattern
- the glob pattern to match fields against- Returns:
- true if the selection set contains these fields
- See Also:
-
containsAnyOf
Description copied from interface:DataFetchingFieldSelectionSet
This will return true if the field selection set matches any of the specified "glob" pattern matches ie the glob pattern matching supported byFileSystem.getPathMatcher(java.lang.String)
.This will allow you to use '*', '**' and '?' as special matching characters such that "invoice/customer*" would match an invoice field with child fields that start with 'customer'.
- Specified by:
containsAnyOf
in interfaceDataFetchingFieldSelectionSet
- Parameters:
fieldGlobPattern
- the glob pattern to match fields againstfieldGlobPatterns
- optionally more glob pattern to match fields against- Returns:
- true if the selection set contains any of these these fields
- See Also:
-
containsAllOf
Description copied from interface:DataFetchingFieldSelectionSet
This will return true if the field selection set matches all of the specified "glob" pattern matches ie the glob pattern matching supported byFileSystem.getPathMatcher(java.lang.String)
.This will allow you to use '*', '**' and '?' as special matching characters such that "invoice/customer*" would match an invoice field with child fields that start with 'customer'.
- Specified by:
containsAllOf
in interfaceDataFetchingFieldSelectionSet
- Parameters:
fieldGlobPattern
- the glob pattern to match fields againstfieldGlobPatterns
- optionally more glob pattern to match fields against- Returns:
- true if the selection set contains all of these these fields
- See Also:
-
getFields
Description copied from interface:DataFetchingFieldSelectionSet
This will return a list of selected fields that match a specified "glob" pattern matching ie the glob pattern matching supported byFileSystem.getPathMatcher(java.lang.String)
.This will allow you to use '*', '**' and '?' as special matching characters such that "invoice/customer*" would match an invoice field with child fields that start with 'customer'.
The fields are guaranteed to be in pre-order as they appear in the query.
A selected field may have an alias - and hence is a unique field in the returned list. It may have the same field names as others in the list but when you also consider the alias then it is indeed unique because it would be another entry in the graphql result.
- Specified by:
getFields
in interfaceDataFetchingFieldSelectionSet
- Parameters:
fieldGlobPattern
- the glob pattern to match fields againstfieldGlobPatterns
- optionally more glob pattern to match fields against- Returns:
- a list of selected fields or empty list if none match
-
getFields
Description copied from interface:DataFetchingFieldSelectionSet
This will return all selected fields.The fields are guaranteed to be in pre-order as they appear in the query.
A selected field may have an alias - and hence is a unique field in the returned list. It may have the same field names as others in the list but when you also consider the alias then it is indeed unique because it would be another entry in the graphql result.
- Specified by:
getFields
in interfaceDataFetchingFieldSelectionSet
- Returns:
- a list of all selected fields or empty list if none match
-
getImmediateFields
Description copied from interface:DataFetchingFieldSelectionSet
This will return all selected fields that are immediate child fields of the field being fetched.The fields are guaranteed to be in pre-order as they appear in the query.
A selected field may have an alias - and hence is a unique field in the returned list. It may have the same field names as others in the list but when you also consider the alias then it is indeed unique because it would be another entry in the graphql result.
- Specified by:
getImmediateFields
in interfaceDataFetchingFieldSelectionSet
- Returns:
- a list of all selected immediate child fields or empty list if none match
-
getFieldsGroupedByResultKey
Description copied from interface:DataFetchingFieldSelectionSet
The result key of a selected field represents what the graphql return value will be. The sameGraphQLFieldDefinition
may lead to a field being asked for multiple times (with differing arguments) if field aliases are used. This method helps you get all possible field invocations grouped by their result key. The arguments are guaranteed to be the same if the result key is the same, otherwise the query would not have validated correctly.- Specified by:
getFieldsGroupedByResultKey
in interfaceDataFetchingFieldSelectionSet
- Returns:
- a map of selected fields grouped by result key or an empty map if none match
-
getFieldsGroupedByResultKey
public Map<String,List<SelectedField>> getFieldsGroupedByResultKey(String fieldGlobPattern, String... fieldGlobPatterns) Description copied from interface:DataFetchingFieldSelectionSet
The result key of a selected field represents what the graphql return value will be. The sameGraphQLFieldDefinition
may lead to a field being asked for multiple times (with differing arguments) if field aliases are used. This method helps you get all possible field invocations grouped by their result key. The arguments are guaranteed to be the same if the result key is the same, otherwise the query would not have validated correctly.- Specified by:
getFieldsGroupedByResultKey
in interfaceDataFetchingFieldSelectionSet
- Parameters:
fieldGlobPattern
- the glob pattern to match fields againstfieldGlobPatterns
- optionally more glob pattern to match fields against- Returns:
- a map of selected fields grouped by result key or an empty map if none match
-
toString
-