src/Server/Helper.php
private function loadPersistedQuery(ServerConfig $config, OperationParams $operationParams)
    {
        // Load query if we got persisted query id:
        $loader = $config->getPersistentQueryLoader();

        if (! $loader) {
            throw new RequestError('Persisted queries are not supported by this server');
        }

        $source = $loader($operationParams->queryId, $operationParams);

        if (! is_string($source) && ! $source instanceof DocumentNode) {
            throw new InvariantViolation(sprintf(
                'Persistent query loader must return query string or instance of %s but got: %s',
                DocumentNode::class,
                Utils::printSafe($source)
            ));
        }

        return $source;
    }
private function loadPersistedQuery(ServerConfig $config, OperationParams $operationParams)
    {
        // Load query if we got persisted query id:
        $loader = $config->getPersistentQueryLoader();

        if (! $loader) {
            throw new RequestError('Persisted queries are not supported by this server');
        }

        $source = $loader($operationParams->queryId, $operationParams);

        if (! is_string($source) && ! $source instanceof DocumentNode) {
            throw new InvariantViolation(sprintf(
                'Persistent query loader must return query string or instance of %s but got: %s',
                DocumentNode::class,
                Utils::printSafe($source)
            ));
        }

        return $source;
    }
private function loadPersistedQuery ( ServerConfig $ config , OperationParams $ operationParams ) { // Load query if we got persisted query id: $ loader = $ config -> getPersistentQueryLoader ( ) ; if ( ! $ loader ) { throw new RequestError ( 'Persisted queries are not supported by this server' ) ; } $ source = $ loader ( $ operationParams -> queryId , $ operationParams ) ; if ( ! is_string ( $ source ) && ! $ source instanceof DocumentNode ) { throw new InvariantViolation ( sprintf ( 'Persistent query loader must return query string or instance of %s but got: %s' , DocumentNode :: class , Utils :: printSafe ( $ source ) ) ) ; } return $ source ; }
@return mixed

@throws RequestError
@return mixed