Tag: gatsby
-
Combine multiple “…” GraphQL fragments into one to be reused
0 I am using Gatsby and its GraphQL database. I am noticing I am duplicating a lot of GraphQL fragments like this on multiple pages. Here is an example of two queries: query Page1 { pageData: page1Data { mainContent { …Fragment1 …Fragment2 …Fragment3 …Fragment4 …Fragment5 } } } query Page2 { pageData: page2Data { mainContent…
-
Unable to connect to WPGraphQL
0 I am new to building with Gatsby and wordpress. when i run "gatsby develop", i get this error on my command line "Unable to connect to WPGraphQL, Either WPGraphQL is not active or there are some WordPress PHP filters in your site which are adding additional output to the GraphQL response. These may have…
-
Error: Gatsby query was left in the compiled code while testing with vitest
0 I am working on a Gatsby website and while testing a component with a graphql query using vitest I keep getting this error : Error: It appears like Gatsby is misconfigured. Gatsby related graphql calls are supposed to only be evaluated at compile time, and then compiled away. Unfortunately, something went wrong and the…
-
Is there any way to get gatsby-source-filesystem name in gatsby-plugin-mdx query?
0 I’m using gatsby-plugin-mdx to create pages. But I want to create different kinds of pages based on the folder they are sourced from with gatsby-source-filesystem. I made the name different in the gatsby-source-filesystem config but I can’t seem to pass that along to the mdx node. Does anyone know of a way to do…
-
Gatsby + graphql-eslint: ESLint Parsing error
0 I’m following an official guide for linting graphql queries in my components. Updating eslint config like guide says causes following error in all my queries: How do I fix it? graphql eslint gatsby Share Improve this question Follow asked 2 hours ago jeron-diovisjeron-diovis 79711 gold badge88 silver badges2020 bronze badges Load 7 more related…
-
Gatsby GraphQL Error: Cannot query field “dogs” on type “Query”
0 I created a custom post type in WordPress and would like to build pages for it. When I try out the queries in the IDE they pull the custom post data ok. When I add it to the code, however, it throws the error Cannot query field "dogs" on type "Query" when I build…
-
How to use OR / AND in graphql query filter or make a case insensitive filter?
19 Just like the post ask I need to be able to search with 3 possible scenarios. I need to have all uppercase, or lowercase, or normal casing. If that is not possible is there a way to do a case insensitive filter instead? allMarkdownRemark(filter: { brand: { eq: $normalBrand } }) { //==> Need…
-
Invariant Violation: Encountered an error trying to infer a GraphQL type for: `tags___NODE`
0 I am new to Gatsby. I’m creating a blog site using Gatsby and Contentful as CMS. On creating a field ‘timeToRead’ I’m getting an error as ERROR #11321 API.NODE.EXECUTION "gatsby-source-contentful" threw an error while running the sourceNodes lifecycle: _node$fields.includes is not a function However whenever I clear cache and rebuild the appliction it works…
-
Gatsby ,GraphQl content mapping bug
0 I am using Gatsby, GraphQl, and contentful. In my project i am trying to connect specific banner section to specific page (like home page should have banner of home and similarly for about us page and other pages) and i am writing my code for banner in banner.jsx . so the approach is every…
-
WordPress gatsby graphql need sorting on children
0 On the following graphql I need sorting/order on the WPChildren with the ‘menuOrder’ item… query ($id: String!) { allWpPage( filter: {id: {eq: $id}} ) { edges { node { id title uri content children { id } blocks } } nodes { wpChildren { nodes { id … on WpPage { id title uri…