How To Fix Error:only Absolute URLS Are Supported In React Ssr Graphql

I'm setting the server side rendering with apollo for set up the graphql in server side but I dont now know how I ran into this problem when ever I tried to use the query in side the one component this error appear in cli:

(node:4440) UnhandledPromiseRejectionWarning: Error: Network error: Only absolute URLs are supported
at new ApolloError (G:\Project\node_modules\apollo-client\bundle.umd.js:59:32)
    at QueryManager.<anonymous> (G:\Project\node_modules\apollo-client\bundle.umd.js:13:49)

Please if you now what happen let me know.

Server code

import React  from 'react'
import routes from '../../client/Routes'

import {StaticRouter} from 'react-router-dom'
import {Provider} from 'react-redux'
import {renderRoutes} from 'react-router-config'
import {AES} from 'crypto-js';
import {Helmet} from "react-helmet";
import serialize from 'serialize-javascript' ;

import  ApolloClient from 'apollo-client';
import { ApolloProvider, renderToStringWithData  } from 'react-apollo';
import { InMemoryCache } from "apollo-cache-inmemory";
import { ApolloLink } from 'apollo-link';
import { errorLink , queryOrMutationLink , getCircularReplacer } from './links';

import fetch from 'node-fetch';

export default async(req,store,context)=>{
    const links = [errorLink,queryOrMutationLink({
        uri: 'http:localhost:3000/api/graphql',
    const client = new ApolloClient({
        ssrMode: true,
        cache: new InMemoryCache()
    const component = (
        <ApolloProvider client={client}>
            <Provider store={store}>
                <StaticRouter location={req.path} context={context}>
    return renderToStringWithData(component).then(content=>{
        let serializedStore = serialize(store.getState())
        let hashedUsersList = AES.encrypt(serializedStore, 'secret key 123');
        const helmet        = Helmet.renderStatic();
        return `
                    <link rel="stylesheet" target="_blank" rel="nofollow noreferrer" href="">
                    <link target="_blank" rel="nofollow noreferrer" href="" rel="stylesheet">
                    <script>window.INITIAL_STATE = ${JSON.stringify(hashedUsersList, getCircularReplacer())}</script>
                    <div id="root">${content}</div>
                    <script src="/public-bundle.js"></script>

import React from 'react';
import {hydrate}from 'react-dom';

import {Provider} from 'react-redux';
import {createStore, applyMiddleware,compose} from 'redux';
import thunk from 'redux-thunk';
import {AES,enc,} from 'crypto-js'
import axios from 'axios'
import {BrowserRouter} from 'react-router-dom';
import routes from './Routes';
import {renderRoutes} from 'react-router-config'

import reducers from './store/reducers';

import ApolloClient       from 'apollo-client';
import { InMemoryCache }  from 'apollo-cache-inmemory';
import { createHttpLink } from 'apollo-link-http';
import { ApolloProvider } from 'react-apollo';
import {fetch} from 'node-fetch';

const client = new ApolloClient({
    connectToDevTools: true,
    link: createHttpLink({
        uri: 'http:localhost:3000/api/graphql',
    cache: new InMemoryCache({dataIdFromObject:o=>}).restore(window.__APOLLO_STATE__),

const axiosInstance = axios.create({baseURL: '/api'});
const composeEnhancers = typeof window === 'object' && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({}) : compose;
const enhancer = composeEnhancers(applyMiddleware(thunk.withExtraArgument(axiosInstance)));

let DecryptUsersList  = AES.decrypt(window.INITIAL_STATE, 'secret key 123');
let UsersList_State = JSON.parse(DecryptUsersList.toString(enc.Utf8))

const store = createStore(reducers,UsersList_State,enhancer)

    <ApolloProvider client={client}>
        <Provider store={store}>

import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import {connect} from 'react-redux';
import {graphql} from 'react-apollo';
import gql from 'graphql-tag';
const Header = (props)=>{
  const renderButtons=()=>{
    if (props.user) {
      return (
          <li><Link to="/admins">Admins</Link></li>
          <li><a target="_blank" rel="nofollow noreferrer" href="/api/logout">Logout</a></li>
    } else {
      return (
            <Link to="/users">Users</Link>
            <Link to="/admins">Admins</Link>
            <Link to="/Signin">SignIn</Link>
            <Link to="/Signup">SignUp</Link>
            <a target="_blank" rel="nofollow noreferrer" href="/api/auth/google">Login via google</a>
    return (
        <div className="nav-wrapper">
          <Link to="/" className="brand-logo left">
          <ul className="right">

const query = gql`
const mapStateToProps =({auth})=>({user:auth.user})
export default connect(mapStateToProps,null)(graphql(query)(Header));


Seems like you have a typo in your url instead of:

uri: 'http:localhost:3000/api/graphql',

you need to use:

uri: 'http://localhost:3000/api/graphql',

with apollo absolute url means that api url must start with http:// or https://