public interface DataFetchingFieldSelectionSet extends java.util.function.Supplier<java.util.Map<java.lang.String,java.util.List<Field>>>
DataFetcher
was invoked.
For example imagine we are fetching the field 'user' in the following query
{
user {
name
age
weight
friends {
name
}
}
}
The selection set in the case above consists of the fields "name, age, weight, friends and friends/name".
You can use this selection set perhaps to "peek" ahead and decide that field values you might need
from the underlying data system. Imagine a SQL system where this might represent the SQL 'projection'
of columns say.Modifier and Type | Method and Description |
---|---|
boolean |
contains(java.lang.String fieldGlobPattern)
This will return true if the field selection set matches a specified "glob" pattern matching ie
the glob pattern matching supported by
FileSystem.getPathMatcher(java.lang.String) . |
java.util.Map<java.lang.String,java.util.List<Field>> |
get() |
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> |
getArguments() |
java.util.Map<java.lang.String,GraphQLFieldDefinition> |
getDefinitions() |
java.util.Map<java.lang.String,java.util.List<Field>> get()
get
in interface java.util.function.Supplier<java.util.Map<java.lang.String,java.util.List<Field>>>
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> getArguments()
java.util.Map<java.lang.String,GraphQLFieldDefinition> getDefinitions()
GraphQLFieldDefinition
s for each field in the selection setboolean contains(java.lang.String fieldGlobPattern)
FileSystem.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'.fieldGlobPattern
- the glob pattern to match fields againstFileSystem.getPathMatcher(String)