mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-17 20:41:49 +03:00
23 lines
522 B
JavaScript
23 lines
522 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: () => {
|
|
return createHttpLink({
|
|
uri: process.env.GATSBY_HASURA_GRAPHQL_URL,
|
|
headers: {},
|
|
fetch
|
|
});
|
|
},
|
|
refetchInterval: 10 // Refresh every 60 seconds for new data
|
|
}
|
|
}
|
|
]
|
|
};
|