Class GQLFragmentDefinition

  • All Implemented Interfaces:
    GQLFragment, GQLSelection

    @Immutable
    public class GQLFragmentDefinition
    extends java.lang.Object
    implements GQLFragment
    A fragment definition, as part of the query.
    • Constructor Detail

      • GQLFragmentDefinition

        public GQLFragmentDefinition​(@Nonnull
                                     java.lang.String name,
                                     @Nonnull
                                     net.morimekta.providence.descriptor.PMessageDescriptor<?> descriptor,
                                     @Nonnull
                                     java.util.List<GQLSelection> selectionSet)
        Parameters:
        name - Name of the fragment.
        descriptor - Descriptor of type defined in this fragment.
        selectionSet - SelectionSet for the fragment.
    • Method Detail

      • getTypeCondition

        @Nonnull
        public net.morimekta.providence.descriptor.PMessageDescriptor<?> getTypeCondition()
        Description copied from interface: GQLFragment
        All fragments represent a specific message type of a union field, or an interface implementation. This should return the descriptor of that message type.
        Specified by:
        getTypeCondition in interface GQLFragment
        Returns:
        The fragment type descriptor.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object