-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgatsby-config.js
More file actions
32 lines (31 loc) · 790 Bytes
/
Copy pathgatsby-config.js
File metadata and controls
32 lines (31 loc) · 790 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
require(`dotenv`).config()
const fetch = require(`node-fetch`)
const { createHttpLink } = require(`apollo-link-http`)
module.exports = {
siteMetadata: {
title: `Gatsby Hasura Starter`,
description: `Demonstration of Gatsby and Hasura`,
author: `@ksmorano`,
},
plugins: [
`gatsby-plugin-sass`,
{
resolve: `gatsby-source-graphql`,
options: {
typeName: `hasura`,
fieldName: `hasura`,
createLink: () => {
return createHttpLink({
uri: process.env.GATSBY_HASURA_GRAPHQL_URL,
headers: {
"x-hasura-admin-secret":
process.env.GATSBY_HASURA_GRAPHQL_ADMIN_SECRET,
},
fetch,
})
},
refetchInterval: 10,
},
},
],
}