MobileDoc node field return null
See original GitHub issueHi,
Each time I tried to query data post/pages through graphiql the mobiledoc field is set to null. If I call the content api directly with a raw curl query it works fine, I’ve got data on mobiledoc format.
I installed the gatsby-source-ghost plugin localy and tried adding mobiledoc on postAndPageFetchOptions object’s formats field. Located in gatsby-node.js, but this does not work.
const postAndPageFetchOptions = { limit: 'all', include: 'tags,authors', formats: 'mobiledoc,html,plaintext' };
Is there something I’ve missed ?
To go further, I thought it would be nice to have mobile doc format to add imageSharp processing support via a transformer plugin. There is a html-to-mobiledoc helper on the ghost SDK, but I don’t think it’s the right way to do it while at some point I should be able to query this format “natively”.
Hope someone can clarify. Have a nice day
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (2 by maintainers)
Oh and I will create a React-helper-component to re-inject the data properly. Would be nice to have a small API to manage styles with it, based on Emotion. After we will just have to pass an object to it to infer all styles based on DOM elmts and/or classnames.
@kevinansfield thanks a lot for your time and for those explanations. I will go this way then.
Need just a bit logic to insert gatsby img component to replace native html img tags, but I get the idea. Shouldn’t be difficult.
Can’t wait to see custom cards in the future 😃
I think we can close this issue. Regards,