Skip to content
This repository has been archived by the owner on Sep 8, 2023. It is now read-only.

typeName & targetField can't read dots #27

Open
wraybowling opened this issue May 13, 2021 · 1 comment
Open

typeName & targetField can't read dots #27

wraybowling opened this issue May 13, 2021 · 1 comment

Comments

@wraybowling
Copy link

sourceField can read dots which is convenient but placing the downloaded URL in a tidy location inside the graphQL tree could be better.

Scenario 1: Read typeName with dots

{
      use: '@noxify/gridsome-plugin-remote-image',
      options: {
        'typeName': 'portfolio.photo.thumbmails.large', // does not work
        'sourceField': 'url',
        'targetField': 'downloadedUrl',
        'targetPath': './src/assets/remoteImages'
      }
},

Scenario 2: Write targetField with dots

{
      use: '@noxify/gridsome-plugin-remote-image',
      options: {
        'typeName': 'portfolio',
        'sourceField': 'photo.thumbnails.large.url', // works!
        'targetField': 'photo.thumbnails.large.downloadedUrl', // does not work
        'targetPath': './src/assets/remoteImages'
      }
},
@noxify
Copy link
Owner

noxify commented May 13, 2021

Hi,

Thanks for reporting.

Currently only the sourceField supports dot-walking.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants