Transform content w/ gatsby-source-graphql

How do you transform content from gatsby-source-graphql?

I have a number of fields that contain absolute URLs to content with my CMS. Let's say hypothetically my CMS lives at https://cms.example.com and my website is at https://example.com. All of the content that comes from the CMS over GraphQL has cms.example.com as part of the absolute URL, but this is incorrect once it ends up within Gatsby.

I've seen that other plugins have ways to modify data, the Remark plugin has "plugins", and the WordPress plugin has "normalisers". Each let you "hook in" and make changes to the data before it's stored. Is that possible with the GraphQL plugin?

Is there any way to search & replace links in the content with Gatsby (without doing it inside React components).

Steve Murphy's photo

I'd like to learn more about GraphQL. happy wheels

Nasty Crusty's photo

That's very important to learn how to transform content.

lee123's photo

hope someone can give solution for this question so i can learn more too..

lee123's photo

reactjs also seems cool..

lee123's photo

but most importantly is we can learn more things from it, i really like coding solving problem thing..

lee123's photo

cms also seems interesting to me..

lee123's photo

still thinking who can give a better answer

lee123's photo

like to learn more about graph ql too..

lee123's photo

good question interesting of graph ql will like to explore more in this..

Eugene Molari's photo

Good question, I'm also looking for something like that!