diff --git a/gatsby-node.js b/gatsby-node.js index 977da42..cde6bfb 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -2,8 +2,9 @@ const Promise = require('bluebird'); const ContentAPI = require('./content-api'); const {PostNode, PageNode, TagNode, AuthorNode, SettingsNode} = require('./ghost-nodes'); -exports.sourceNodes = ({boundActionCreators}, configOptions) => { - const {createNode} = boundActionCreators; +exports.sourceNodes = ({actions}, configOptions) => { + const {createNode} = actions; + const api = ContentAPI.configure(configOptions); const postAndPageFetchOptions = { diff --git a/test/gatsby-node.test.js b/test/gatsby-node.test.js index 2d07abc..cd2524a 100644 --- a/test/gatsby-node.test.js +++ b/test/gatsby-node.test.js @@ -15,7 +15,7 @@ describe('Basic Functionality', function () { const createNode = sinon.stub(); gatsbyNode - .sourceNodes({boundActionCreators: {createNode}}, {}) + .sourceNodes({actions: {createNode}}, {}) .then(() => { createNode.callCount.should.eql(7);