Questions tagged [wp-graphql]

107 questions
0
votes
0 answers

Gatsby / WooCommerce not processing mediaItems

I'm having major problems trying to build a Gatsby / WooCommerce site - whenever wp-graphql-woocommerce is activated it simply will not process any media items, with this error: -- gatsby-source-wordpress Error category: undefined Error: …
0
votes
2 answers

register_graphql_field returning null values

I am trying to return values from a query that is only returning null values or is giving me errors based upon everything that I have tried. I have created a WP Plugin to put this code. I have pasted my code below I have edited this code to what is…
codmoncai
  • 1
  • 3
0
votes
1 answer

Apollo Client not fetching URI

I am currently trying to convert my Wordpress site to a headless CMS using Next.js, GraphQL and Apollo. I'm using the WPGraphQL plugin to set up my query and everything seems fine but I keep getting an error that my localhost URL is undefined. Here…
Ariel
  • 1
  • 2
0
votes
0 answers

Headless Wordpress using React and WPGraphql

I have searched for what seems like days and the documentation on WpGraphql is not really that good. I have tried reading the WpGraphql documentation to find how to connect a custom DB Table to WpGraphql. I have also tried to find tutorials or…
codmoncai
  • 1
  • 3
0
votes
0 answers

Wordpress WooCommerce get cross sell prducts for Composite Products using GraphQL

I am trying to get cross-sell products of composite products. But I couldn't find it in the GraphQL IDE. Is there any way to query cross-sell products for composite products?
Sampath
  • 1,173
  • 18
  • 29
0
votes
0 answers

How to add a custom field to wpgraphql existing query

I have a problem in posts query, I want to add a new key likes to the existing posts query to count total number likes to the particular post. Is there any hooks to do it?? I have tried with another custom query to get post like by post id but need…
0
votes
0 answers

WPGraphQL Can't filter or query fields in custom post types

I made a custom post type for events but I am not able to filter using (eventID: $id) or even with the where clause. I am pretty new to GraphQL but the documentation implies it should be possible. I created this custom post type with Custom Post…
0
votes
0 answers

WPGraphQL not showing manual excerpt

In a NextJS project, I am pulling posts from WordPress using WPGraphQL plugin. I am not getting the excerpts manually added to the posts. Here is my code: query AllPosts { posts(first: 20) { edges { node { title excerpt …
Ben Jonson
  • 565
  • 7
  • 22
0
votes
0 answers

WPGraphQL "where" is not case-sensitive

Hi there I am using the WPGraphQL Plugin, however, I am having trouble with the query clause where: query getCaseStudy { caseStudies(where: {name : "something-like-this" }) { nodes { databaseId } } } the above code returns a valid and…
0
votes
0 answers

Unable to get results using map in Nextjs wordpress headless cms

I am developing headless WordPress with NExtjs. menuItems is props that contain an object. when I console.log(menuItems ) it shows output in the console similar to "const menu" but when I map "menu" it maps perfectly but when I map menuItems, the…
R B
  • 1
  • 1
0
votes
1 answer

Why do my Astro builds fail when featuredImage is null?

I'm using WPGraphQL to query all of my posts from WordPress. And I'm using Astro to display a list of cards for each of those posts on the front-end. Here is what that my GraphQL query looks like: /* BASIC FETCH API */ async function…
0
votes
1 answer

gatsby"permission to view this setting." email

When working with Gatsby and the GraphiQL web console, I get the following error in the output from a query that accesses the site email: Sorry, you do not have permission to view this setting. This was after updating to the latest version of…
Sez
  • 1,275
  • 11
  • 26
0
votes
1 answer

Querying with language filter in Gatsby GraphQL from Wordpress with polylang returns null

I work on a website that is build with Wordpress as a headless CMS and I connect it to Gatsby with WPGraphql. Everything worked fine until I tried to add polylang plugin in order to make it multilingual. I added a page with two languages and inside…
jakmas
  • 83
  • 1
  • 1
  • 8
0
votes
1 answer

Retrieving a list of tags in wordpress that ALSO have another tag and/or (custom) taxonomy

I'm hoping someone might be able to point me in the right direction for this lil brain-teaser? Basically I'm working on a wordpress site which runs on both PHP and WP-graphQL. Essentially it's a video site. The initial load is done by normal…
Ben McDonald
  • 21
  • 1
  • 3
0
votes
1 answer

Gatsby-Wordpress GraphQL does not update data when added from Wordpress

I have a website which I have developed using Gatsby. I have used WordPress for posting blogs for website and I'm fetching blogs using GraphQL. Everything is working fine, and I deployed the website on S3. After production deployment, when I…
Ravi.K
  • 41
  • 1
  • 6