progital / gatsby-wpgraphql-blog-example

https://github.com/wp-graphql/gatsby-wpgraphql-blog-example adapted for gatsby-wpgraphql-inline-images demo
MIT License
5 stars 3 forks source link

Plugin not replacing img with Gatsby Img tag #1

Open spencersmb opened 4 years ago

spencersmb commented 4 years ago

I've installed everything locally and I'm able to display content from my local wordpress site. The issue I'm having is that the images are all urls from the wordpress site, when I thought that they would be downloaded as static images to the gatsby site and sourced from the static folder. Currently none of that is working. I'm wondering if you can advise.

my github of the demo install is here: https://github.com/spencersmb/wordpress-graphql-gatsby-demo

I'm able to display my posts and show images, but it doesn't seem to make a difference when using dangerouslySetInnerHtml vs. ContentParser in my code. In my demo - I added the code to layout.js

Thanks for any help or advice.

jenkin commented 4 years ago

Same issue here, maybe these warnings at build time can be useful: warn "createResolvers" passed resolvers for type "wpgraphql_page" that doesn't exist in the schema. Use "createTypes" to add the type before adding resolvers.

jenkin commented 4 years ago

Nevermind, with graphqlTypeName: "WPGraphQL" in this plugin configuration matching typeName: "WPGraphQL" in gatsby-source-graphql configuration, it works fine.