import * as Relay from "react-relay"
const sharify = require("sharify")

export function artsyNetworkLayer(user?: any) {
  return new Relay.DefaultNetworkLayer(sharify.data.METAPHYSICS_ENDPOINT, {
    headers: !!user ? {
      "X-USER-ID": user.id,
      "X-ACCESS-TOKEN": user.accessToken,
    } : {},
  })
}

/*
 * For the client.
 */
export function artsyRelayEnvironment() {
  Relay.injectNetworkLayer(artsyNetworkLayer())
}

import * as Relay from "react-relay"
const sharify = require("sharify")

export const metaphysicsURL = "https://metaphysics-production.artsy.net"

export function artsyNetworkLayer(user?: any) {
  return new Relay.DefaultNetworkLayer(metaphysicsURL, {
    headers: !!user ? {
      "X-USER-ID": user.id,
      "X-ACCESS-TOKEN": user.accessToken,
    } : {},
  })
}

/*
 * For the client.
 */
export function artsyRelayEnvironment() {
  Relay.injectNetworkLayer(artsyNetworkLayer())
}

--- 
+++ 
@@ -1,10 +1,8 @@
 import * as Relay from "react-relay"
 const sharify = require("sharify")
 
-export const metaphysicsURL = "https://metaphysics-production.artsy.net"
-
 export function artsyNetworkLayer(user?: any) {
-  return new Relay.DefaultNetworkLayer(metaphysicsURL, {
+  return new Relay.DefaultNetworkLayer(sharify.data.METAPHYSICS_ENDPOINT, {
     headers: !!user ? {
       "X-USER-ID": user.id,
       "X-ACCESS-TOKEN": user.accessToken,
Use metaphysics url from ENV rather than hard-coded value
