Class AbstractRule

    • Method Detail

      • isVisitFragmentSpreads

        public boolean isVisitFragmentSpreads()
      • setVisitFragmentSpreads

        public void setVisitFragmentSpreads​(boolean visitFragmentSpreads)
      • addError

        public void addError​(ValidationErrorType validationErrorType,
                             java.util.Collection<? extends Node<?>> locations,
                             java.lang.String description)
      • getQueryPath

        protected java.util.List<java.lang.String> getQueryPath()
      • isExperimentalApiKeyEnabled

        protected java.lang.Boolean isExperimentalApiKeyEnabled​(java.lang.String key)
        Verifies if the experimental API key is enabled
        Parameters:
        key - to be checked
        Returns:
        if the experimental API key is enabled
      • i18n

        public java.lang.String i18n​(ValidationErrorType validationErrorType,
                                     I18nMsg i18nMsg)
        Creates an I18n message using the I18nMsg
        Parameters:
        validationErrorType - the type of validation failure
        i18nMsg - the i18n message object
        Returns:
        the formatted I18n message
      • i18n

        public java.lang.String i18n​(ValidationErrorType validationErrorType,
                                     java.lang.String msgKey,
                                     java.lang.Object... msgArgs)
        Creates an I18N message using the key and arguments
        Parameters:
        validationErrorType - the type of validation failure
        msgKey - the key in the underlying message bundle
        msgArgs - the message arguments
        Returns:
        the formatted I18N message
      • checkDocument

        public void checkDocument​(Document document)
      • checkArgument

        public void checkArgument​(Argument argument)
      • checkTypeName

        public void checkTypeName​(TypeName typeName)
      • checkVariableDefinition

        public void checkVariableDefinition​(VariableDefinition variableDefinition)
      • checkField

        public void checkField​(Field field)
      • checkInlineFragment

        public void checkInlineFragment​(InlineFragment inlineFragment)
      • checkDirective

        public void checkDirective​(Directive directive,
                                   java.util.List<Node> ancestors)
      • checkFragmentSpread

        public void checkFragmentSpread​(FragmentSpread fragmentSpread)
      • checkFragmentDefinition

        public void checkFragmentDefinition​(FragmentDefinition fragmentDefinition)
      • checkOperationDefinition

        public void checkOperationDefinition​(OperationDefinition operationDefinition)
      • leaveOperationDefinition

        public void leaveOperationDefinition​(OperationDefinition operationDefinition)
      • checkSelectionSet

        public void checkSelectionSet​(SelectionSet selectionSet)
      • leaveSelectionSet

        public void leaveSelectionSet​(SelectionSet selectionSet)
      • documentFinished

        public void documentFinished​(Document document)
      • checkObjectValue

        public void checkObjectValue​(ObjectValue objectValue)
      • toString

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