question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MobileDoc node field return null

See original GitHub issue

Hi,

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”.

ghostnodegraphql

Hope someone can clarify. Have a nice day

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
tomVltcommented, Jan 26, 2019

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.

0reactions
tomVltcommented, Jan 29, 2019

@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,

Read more comments on GitHub >

github_iconTop Results From Across the Web

1 - Stack Overflow
Where the value of the field is either null or is unset and possibly missing from the document, then you use $ifNull in...
Read more >
Working with null - Cypher Manual - Neo4j
In Cypher, null is used to represent missing or undefined values. Conceptually, null means a missing unknown value and it is treated somewhat...
Read more >
Query for Null or Missing Fields — MongoDB Manual
The query returns only the document where the item field has a value of null . Existence Check. The following example queries for...
Read more >
node_load is returning null value (NEWBIE question) - Drupal
The nid is valid (I have checked that it exists in the node table) but when I do a node_load using that value...
Read more >
Why Is My Field Null? - Relay
In this case GraphQL will return null for that field. This is true even if the server resolver's return type is non-nullable. The...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found