Hello I am having difficulty returning an api end point in Gridsome via the Gridsome documented way. I think it is because what is returned is xml insead of pure json.
Does anyone have any ideas as to how to get this data into the graphql layer in Gridsome. This is the documented way to return the data this works for pure json i.e. https://jsonplaceholder.typicode.com/posts but not for http://balfourmanson.master.d8digital.com/umbraco/api/NewsAndEventsApi/getall
const axios = require('axios')
module.exports = function (api) {
api.loadSource(async actions => {
const collection = actions.addCollection('News')
const {
data
} = await
axios.get('http://balfourmanson.master.d8digital.com/umbraco/api/NewsAndEventsApi/getall')
for (const item of data) {
collection.addNode({
id: item.id,
title: item.title,
content: item.content
})
}
})
}
Thanks in advance