Last active
May 17, 2020 00:44
-
-
Save ryanbelke/44964458090e943030863260a572eee4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* /lib/apollo.js */ | |
import { HttpLink } from "apollo-link-http"; | |
import { withData } from "next-apollo"; | |
const API_URL = process.env.NEXT_PUBLIC_API_URL || "http://localhost:1337" | |
const config = { | |
link: new HttpLink({ | |
uri: `${API_URL}/graphql`, // Server URL (must be absolute) | |
}) | |
}; | |
export default withData(config); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment