DEV Community

Discussion on: Gatsby with WPGraphQL, ACF and Gatbsy-Image

Collapse
 
henrikwirth profile image
Henrik Wirth • Edited

I just tried this:

createResolvers({
    WPGraphQL_Avatar: {
      imageFile: {
        type: "File",
        resolve(source) {
          return createRemoteFileNode({
            url: source.url,
            store,
            cache,
            createNode,
            createNodeId,
            reporter,
          })
        },
      },
    },
  })

Seems to work for me. Obviously it will fetch gravatars at build time. Maybe another Avatar solution would be possible, if you want to avoid using Gravatars.