Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't query page context fields of pages created in gatsby-node.js #46

Open
MartinConde opened this issue Aug 24, 2021 · 1 comment
Open

Comments

@MartinConde
Copy link

MartinConde commented Aug 24, 2021

I'm using gatsby-node.js to create a bunch of pages which I would like to search through using your plugin. I'm passing all the needed data into the pagecontext during the creation of the pages.

My query looks like this:

 query: `
      {
        allSitePage {
          edges {
            node {
              path
              context {
                id__normalized
                market_cap_rank
                name
                symbol
              }
            }
          }
        }
      }
        `,

The error says: Cannot query field "context" on type "SitePage".

I'm not really sure if this just isn't supported or whether I am overlooking something here. The only thing that I can see that seems fishy to me is that the "success create pages" message in the console comes after the error, which makes me think that the pages don't exist yet when I'm trying to query them.

Any hints would be much appreciated! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants