Graphql erabiltzen du (#5)
* feat: graphql erabiltzen du * node bertsioa jeisten du * feat: netlify deployments sartzen du * feat: token-a sortzen du * chore: Gatsbyren aldagaiak berreskuratzen ditu * fix: query-a konpontzen du
This commit is contained in:
@@ -2,43 +2,6 @@ require('dotenv').config({
|
||||
path: `.env.${process.env.NODE_ENV}`,
|
||||
});
|
||||
|
||||
const qs = require('qs');
|
||||
const query = qs.stringify(
|
||||
{
|
||||
populate: {
|
||||
edariBeroak: {
|
||||
populate: ['alergenoak'],
|
||||
},
|
||||
infusioEkologikoak: {
|
||||
populate: ['alergenoak'],
|
||||
},
|
||||
edariHotzak: {
|
||||
populate: ['alergenoak'],
|
||||
},
|
||||
pikatzekoak: {
|
||||
populate: ['alergenoak'],
|
||||
},
|
||||
gozoak: {
|
||||
populate: ['alergenoak'],
|
||||
},
|
||||
anizkoJogurta: {
|
||||
populate: ['alergenoak'],
|
||||
},
|
||||
tostadak: {
|
||||
populate: ['alergenoak'],
|
||||
},
|
||||
konboak: {
|
||||
populate: ['alergenoak'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
encodeValuesOnly: true,
|
||||
},
|
||||
);
|
||||
|
||||
const apiUrl = process.env.API_URL || 'http://localhost:1337/api';
|
||||
|
||||
module.exports = {
|
||||
plugins: [
|
||||
'gatsby-plugin-react-helmet',
|
||||
@@ -50,35 +13,28 @@ module.exports = {
|
||||
},
|
||||
},
|
||||
{
|
||||
resolve: 'gatsby-source-custom-api',
|
||||
resolve: 'gatsby-source-strapi-graphql',
|
||||
options: {
|
||||
rootKey: 'kafetegia',
|
||||
url: `${apiUrl}/kafetegia?${query}`,
|
||||
},
|
||||
},
|
||||
{
|
||||
resolve: 'gatsby-source-strapi',
|
||||
options: {
|
||||
apiURL: apiUrl,
|
||||
apiURL: 'http://localhost:1337',
|
||||
collectionTypes: [],
|
||||
singleTypes: [
|
||||
'hasiera',
|
||||
{
|
||||
name: 'kafetegia',
|
||||
queryParams: {
|
||||
populate: '*',
|
||||
},
|
||||
},
|
||||
'kafetegia',
|
||||
'lege-oharra',
|
||||
'pribatutasun-politika',
|
||||
],
|
||||
queryLimit: 1000,
|
||||
contentTypes: [],
|
||||
// Enable/disable cache.
|
||||
cache: false,
|
||||
token:
|
||||
'307442ef6911b9692d6946bf6aac5d910795b56d92063e8a58ace14e31c8ac6ad7b64480ba591689abbad02758da9562e423e1ef1af8b9f303612ffb63f94f567060ea9f690d9d14bce676bdcf985a2a8c95643963ffd6f593490bb4b4ccae51572cbf315e7c823d0f368de2fe113b113986e9943df1a81e6e4228b82cc7cead',
|
||||
},
|
||||
},
|
||||
'gatsby-transformer-sharp',
|
||||
'gatsby-plugin-sharp',
|
||||
'gatsby-plugin-styled-components',
|
||||
{
|
||||
resolve: `gatsby-plugin-manifest`,
|
||||
resolve: 'gatsby-plugin-manifest',
|
||||
options: {
|
||||
name: 'Laba',
|
||||
short_name: 'Laba',
|
||||
@@ -90,7 +46,6 @@ module.exports = {
|
||||
},
|
||||
},
|
||||
'gatsby-plugin-offline',
|
||||
// 'gatsby-plugin-sitemap',
|
||||
{
|
||||
resolve: 'gatsby-plugin-react-svg',
|
||||
options: {
|
||||
@@ -100,7 +55,7 @@ module.exports = {
|
||||
},
|
||||
},
|
||||
{
|
||||
resolve: `gatsby-plugin-webfonts`,
|
||||
resolve: 'gatsby-plugin-webfonts',
|
||||
options: {
|
||||
fonts: {
|
||||
google: [
|
||||
|
||||
Reference in New Issue
Block a user