mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-18 04:51:35 +03:00
22 lines
504 B
JavaScript
22 lines
504 B
JavaScript
const fetch = require(`node-fetch`)
|
|
const { createHttpLink } = require(`apollo-link-http`)
|
|
|
|
module.exports = {
|
|
plugins: [
|
|
{
|
|
resolve: 'gatsby-source-graphql',
|
|
options: {
|
|
typeName: 'HASURA',
|
|
fieldName: 'hasura',
|
|
createLink: () =>
|
|
createHttpLink({
|
|
uri: `${ process.env.HASURA_GRAPHQL_URL }`,
|
|
headers: {},
|
|
fetch,
|
|
}),
|
|
refetchInterval: 10, // Refresh every 60 seconds for new data
|
|
},
|
|
},
|
|
]
|
|
};
|