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.

How to debug a source plugin on Gatsby side?

See original GitHub issue

Summary

I am using the plugin gatsby-source-datocms and I faced that createNodeField doesn’t create anything. I believe it is not related to the Gatsby side but I would like to know how can I trace down the root cause of my additional fields can’t be queried.

I would like to place some logs on the Gatsby side to see the node content, after it is processed by the plugin.

Reference: https://github.com/datocms/gatsby-source-datocms/issues/92

Relevant information

Environment (if relevant)

File contents (if changed)

gatsby-config.js: N/A package.json: N/A gatsby-node.js: N/A gatsby-browser.js: N/A gatsby-ssr.js: N/A

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:18 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
winstonmacommented, Mar 20, 2020

Thanks @Js-Brecht

After I changed the last infer: false to infer: true in https://github.com/datocms/gatsby-source-datocms/blob/master/src/hooks/sourceNodes/createTypes/item/index.js

I can see my added field in GraphQL.

0reactions
LekoArtscommented, Mar 20, 2020

I would suggest moving that issue to the plugin repo then as it doesn’t seem to be an issue with Gatsby - and the initial question was answered. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Debugging the Build Process - Gatsby
Press Ctrl + , or ⌘ + , to open your preferences. Type node debug into the search bar. Make sure the Auto...
Read more >
Advanced Features: Debugging - Next.js
Now go to the Debug panel ( Ctrl + Shift + D on Windows/Linux, ⇧ + ⌘ + D on macOS), select a...
Read more >
Gatsby: The ultimate guide with examples - LogRocket Blog
This tutorial covers everything you'll ever need to know about Gatsby, including code demos and comparisons to React and Next.js.
Read more >
5 Optimizations to Get Faster Gatsby Builds Today - Netlify
It allows us to pull in data from any source, gives us access to a rich ecosystem (both of Gatsby-specific plugins and the...
Read more >
gatsby-source-wordpress - npm
// In your gatsby-config.js module. ; { plugins · [ ; * Gatsby's data processing layer begins with “source” * plugins. Here 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