gridsome / gridsome

⚡️ The Jamstack framework for Vue.js
https://gridsome.org
MIT License
8.53k stars 489 forks source link

@gridsome/source-contentful locales not support at linked Data #1589

Open qiaofeng1227 opened 2 years ago

qiaofeng1227 commented 2 years ago

I can't get linked data's content by @gridsome/source-contentful, I Just started learning gridsome, It is an excellent framework. and I really hope to get the help of community technical experts.

Problem description: I use @gridsome/source-contentful, config as following in [gridsome.config.js]:

   {
      use: '@gridsome/source-contentful',
      options: {
        space: 'xxxxxx', // required
        accessToken: 'uudsxxxxxx', // required
        host: 'cdn.contentful.com',
        environment: 'master',
        typeName: 'Contentful',
        parameters: {
          locale: "*"
        }
      }
    }

My Product linked Catalog: image

I query data on page

query {
  allContentfulProduct(sortBy:"hot",order: DESC){
    edges {
      node {
        id,
        title{
          en_US
          zh_CN
        },
        key{
          en_US
        },
        description,
        summary{
          en_US
          zh_CN
        },
        review{
          en_US
        },
       catalog{
          en_US{
            fields{
              key{
                en_US
              },
              title{
                en_US,
                zh_CN
              },
              top{
                en_US,
              },

              catalog{
                en_US{
                  fields{
                    key{
                      en_US
                    },
                    title{
                      en_US
                    },
                    top{
                      en_US
                    },
                    catalog{
                        en_US{
                          fields{
                            key{
                              en_US
                            },
                            title{
                              en_US
                            },
                            top{
                              en_US
                            },
                          }
                        }
                      }
                  }
                }
              }
            }
          },
          zh_CN{
             sys{
              id,
              contentType{
                __typename
              }

            }
            fields{
              key{
                en_US
              },
              title{
                zh_CN
              },
              top{
                en_US
              },

              catalog{
                zh_CN{
                  fields{
                    key{
                      en_US
                    },
                    title{
                      zh_CN
                    },
                    top{
                      en_US
                    }
                  }
                }
              }
            }
          }       
        }
        featured{
          en_US
        },
        hot{
          en_US
        },
        delivery{
          en_US
          zh_CN
        },
        os{
          en_US
        },
        cloud{
          en_US,
          zh_CN
        },
        priceModel{
          en_US,
          zh_CN
        }
        description
      }
    }
  }

}

I can get chinese and english on product 【title】property, but linked catalog's title,key is null image

qiaofeng1227 commented 2 years ago

Who has the same problem as me? I'd love to discuss it here, thanks

qiaofeng1227 commented 2 years ago

@kecrily I am very glad to meet you, You submitted an issue on gridsome and were officially accepted. It's very powerful. Can you share my question.

kecrily commented 2 years ago

I haven't used contentful, so I can't necessarily help you. And is that the data returned by the contentful api on the right in your screenshot?

qiaofeng1227 commented 2 years ago

您好,我也湖南长沙的,徐伟,主要是做云市场开源项目云原生的,您是浙江杭州人吗? 看您在github开源项目提交issue,并获得社区合并,非常想跟您交流和学习。 我的电话是 19936716250(微信同号)

------------------ 原始邮件 ------------------ 发件人: "gridsome/gridsome" @.>; 发送时间: 2021年12月7日(星期二) 晚上11:09 @.>; @.**@.>; 主题: Re: [gridsome/gridsome] @gridsome/source-contentful locales not support at linked Data (Issue #1589)

I haven't used contentful, so I can't necessarily help you. And is that the data returned by the contentful api on the right in your screenshot?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.