protected function getSuggestedFieldNames(OutputTypeInterface $type, string $fieldName): array
    {
        if (!($type instanceof ObjectType || $type instanceof InterfaceType)) {
            // Otherwise, must be a Union type, which does not define fields.
            return [];
        }

        $possibleFieldNames = \array_keys($type->getFields());

        return suggestionList($fieldName, $possibleFieldNames);
    }
protected function getSuggestedFieldNames(OutputTypeInterface $type, string $fieldName): array
    {
        if (!($type instanceof ObjectType || $type instanceof InterfaceType)) {
            // Otherwise, must be a Union type, which does not define fields.
            return [];
        }

        $possibleFieldNames = \array_keys($type->getFields());

        return suggestionList($fieldName, $possibleFieldNames);
    }
protected function getSuggestedFieldNames ( OutputTypeInterface $ type , string $ fieldName ) : array { if ( ! ( $ type instanceof ObjectType || $ type instanceof InterfaceType ) ) { // Otherwise, must be a Union type, which does not define fields. return [ ] ; } $ possibleFieldNames = \ array_keys ( $ type -> getFields ( ) ) ; return suggestionList ( $ fieldName , $ possibleFieldNames ) ; }
For the field name provided, determine if there are any similar field names
that may be the result of a typo.

@param OutputTypeInterface $type
@param string              $fieldName
@return array
@throws \Exception
For the field name provided determine if there are any similar field names that may be the result of a typo .