progital / gatsby-wpgraphql-inline-images

Solution for Gatsby and WPGraphQL sourced content. Downloads images locally.
MIT License
35 stars 12 forks source link

ACF Flexible Content - Rich Content / WYSIWYG fields #27

Closed ardiewen closed 4 years ago

ardiewen commented 4 years ago

Hi there, can you confirm that the scope of this utility is limited to the default "Content" field that comes with Wordpress Post and Page post types, including CPTs that utilize the built in Content field?

I did some brief testing on a CPT that I have that ignores the built-in Content field, but instead uses the ACF Flexible Content field to create a Layout that uses a WYSIWYG field.

For all intents and purposes, the functionality on the CMS side looks the same, but my graphql queries would be further nested such as:

fragment OneColumnContentFields on Wordpress_LandingPage_Landingpagefields_Content_OneColumnContent {
  background {
    ...
  }
  content
}

query GET_LANDING_PAGE($id: ID!) {
    wordpress {
      landingPage(id: $id) {
        id
        uri
        title
        landingPageFields {
          content {
            __typename
            ...OneColumnContentFields
          }
        }
      }
    }
  }

Doesn't appear that the plugin will pick up the ACF WYSIWYG field thats nested inside of Flexible Content. Not sure if this is a bug or simply not intended functionality.

progital commented 4 years ago

Hi! You're right, the scope is limited to the default content field only. Supporting ACF fields was something I was considering but right now I'm waiting for the new wordpress source plugin release before doing anything with this plugin.