applyMiddleware()

in 6-serverless-graphql-stack/createGraphQLClient.tsx [10:18]


	  applyMiddleware(req, next) {
	    if (!req.options.headers) {
	      req.options.headers = {};  // Create the header object if needed.
	    }
	    // get the authentication token from local storage if it exists
	    
	    req.options.headers['x-api-key'] = 'da2-xxxxx'
	    next();
	  }