public interface GQLSelection
| Modifier and Type | Method and Description |
|---|---|
default List<GQLSelection> |
getSelection(net.morimekta.providence.descriptor.PField<?> field)
Get all selection entries related to the given field.
|
List<GQLSelection> |
getSelectionSet() |
default boolean |
hasSelection(net.morimekta.providence.descriptor.PField<?>... fields)
Check if any of the given fields are in the selection.
|
default boolean |
hasSelectionPath(net.morimekta.providence.descriptor.PField<?>... fields)
Browse downward fields so that we figure out if the selection (based on
a field path based on the returning structure) if selected.
|
@Nullable List<GQLSelection> getSelectionSet()
default boolean hasSelection(@Nonnull net.morimekta.providence.descriptor.PField<?>... fields)
getSelection(PField) returns
a non-empty list.fields - Fields to check selection for.default boolean hasSelectionPath(@Nonnull net.morimekta.providence.descriptor.PField<?>... fields)
hasSelectionPath("a", "b") will first look for the selection
of "a", then for selection of "b" within a. Will treat a non-selection
as the selection being there.fields - Fields as in a field path to check from the current
selection.@Nonnull default List<GQLSelection> getSelection(@Nonnull net.morimekta.providence.descriptor.PField<?> field)
hasSelection(PField[]) called with the same field returns
true.field - The field to get selection for.Copyright © 2015–2020 morimekta.net. All rights reserved.