ikhudo / gatsby-source-strapi-localized

Gatsby 2 Strapi source with basic localization support
MIT License
4 stars 2 forks source link

Not working as expected #1

Open tomascg2309 opened 5 years ago

tomascg2309 commented 5 years ago

Hey! I'm trying to use this plugin on the implementation of a future project (right now I'm using a tutorial), but it doesn't work as expected despite I have followed all the steps described on the documentation. I leave some screenshots to you, so I hope you could help me :) Thank you! gatsby-graphql-view strapi-view

Cheers! Tomás.

PS. My gastby-config.js looks like that: module.exports = { siteMetadata: { title: 'My super blog', description: 'Gatsby blog with Strapi', author: 'Strapi team' }, plugins: [ { resolve:gatsby-source-filesystem, options: { name:images, path:${__dirname}/src/images, }, }, 'gatsby-plugin-react-helmet', { resolve: 'gatsby-source-strapi', options: { apiURL: 'http://localhost:1337', contentTypes: [ // List of the Content Types you want to be able to request from Gatsby. 'article', 'user' ], availableLngs: ['en', 'es'], //queryLimit: 1000, }, }, 'gatsby-transformer-sharp', 'gatsby-plugin-sharp', { resolve:gatsby-plugin-manifest, options: { name: 'gatsby-starter-default', short_name: 'starter', start_url: '/', background_color: '#663399', theme_color: '#663399', display: 'minimal-ui', icon: 'src/images/gatsby-icon.png', // This path is relative to the root of the site. }, }, 'gatsby-plugin-offline', ], }

alecananian commented 5 years ago

Try the query in the ReadMe instead (note, the query does not have the __en portion of the property name in it):

{
  allStrapiArticles {
    edges {
      node {
        id
        locales {
          title
          content
          lng
        }
      }
    }
  }
}