Questions tagged [wp-graphql]

107 questions
1
vote
1 answer

GraphQL Where clause with boolean doesnt work (wpgraphql)

I am using GraphQL in Wordpress as API with this plugin: https://docs.wpgraphql.com/getting-started/custom-fields-and-meta I created custom field and I want to use where clause for boolean attribute but I get all record even those who dont match my…
0
votes
0 answers

Nuxt 3 - useFetch when one query depends on the result of another

I'm working on a headless Nuxt 3 app and I'm running into an issue with my blog. I think this exposing a gap in my knowledge of how Nuxt 3's fetch utils work. Here's the overview of what I need to happen: The hero of the blog page is a post feature…
0
votes
0 answers

Eleventy Static Image Generation

I'm using Eleventy, Eleventy-Fetch and WPGraphQL to generate a static version of a WordPress site. All works as required, however I was wondering if it's possible to use a similar setup to generate images. I could use WPGraphQL to get a list of…
markpirvine
  • 1,485
  • 1
  • 23
  • 54
0
votes
0 answers

WpgraphQL Viewer query always returns null

I am working on a headless WordPress + Next.js app In my GraphiQL ide when i query the current viewer (me !) I keep getting null as a result I am using the latest WP version + latest wpgraphqQL + latest WPGraphQL CORS plugin May be this is caused by…
0
votes
0 answers

NextJS catch all route structure

I have a Next.js website which gets news from Wordpress with WPGraphQl. User can filter posts with categories and goals. I'm trying to set a catch all route which will replace the current structure which I have here: Here are my current…
Čedomir Babić
  • 522
  • 4
  • 12
0
votes
0 answers

Querying custom term_meta field using WPGraphQL returns an empty field for that term

I have a custom color field in the wp_termmeta table for my wordpress theme tags. The values are saved in the database fine. However I have issues registering it with the WPGQL plugin - when I run the query, it always comes back empty: { …
budgiebeaks
  • 159
  • 9
0
votes
1 answer

Getting all post data even when specifying post id to get just one - WPGraphql

I am trying to get a cursor for a post given the postId but in return I am getting cursors of all posts. Note that this query works fine when I hardcode the id into the query. query: export const GET_POST_CURSOR = gql ` query GetPostById($id: Int)…
sash
  • 101
  • 7
0
votes
0 answers

gatsby-source-wordpress wpgraphql allWpCategory count not updating when I start assigning post

I hope everyone see this and have the same issue. I'm using headless approach with gatsbyjs, my problem is the count, IT'S not updating when I start assigning post in the categories. It's still showing null, even though there is a post in the…
zarnel
  • 1
0
votes
0 answers

How can I fix WPGraphQL not passing image URLs after deploying my Headless Wordpress website?

I'm trying to deploy Headless Wordpress website with NextJS. Everyting was working fine on local but after I deployed Wordpress by Hostinger VPS, Graphql is not getting image url... enter image description here I'm using mysql Ver…
0
votes
0 answers

Is there a way of getting the metadata of a page using yoast in headless wordpress with wpgraphql and next.js?

I've been wondering if there is a way of getting the metadata for a page (not a blog post) using yoast seo in headless WordPress with wpgraphql and next.js. When I say page I mean like the Home page, About, Contact... Right now I have created the…
Laicus
  • 1
  • 2
0
votes
0 answers

Query gallery items using wp-graphql

I am converting a WordPress website to use Next.js with wp-graphql. The site has a gallery category, and the gallery posts contain multiple images. I need to query the gallery items using wp-graphql, I can't use ACF. I tried to register a gallery…
ilyes
  • 1
0
votes
0 answers

Is there a way to make the newest version of WP GraphQL plugin compatible with gatsby-source-wordpress 3.1.*?

I have a Gatsby app with the following dependencies: "gatsby": "^2.15.14", "gatsby-awesome-pagination": "^0.3.3", "gatsby-plugin-google-analytics": "^2.1.31", "gatsby-plugin-intl": "^0.3.2", "gatsby-plugin-lodash": "^3.1.7", "gatsby-plugin-netlify":…
lukbrt
  • 308
  • 3
  • 8
0
votes
1 answer

How to get the postmeta field values in the posts wpgraphql query?

I am using wpgraphql to communicate with wordpress database. I have got one posts table in which I can see all the attributes of the post filled. There is a field for custom field too, I can see the value filled for custom field in the postMeta…
0
votes
0 answers

Fresh Nuxt 3 App: GraphQL data doesnt render

I'm trying to make a Nuxt 3 App which requests data on a local WordPress installation (WPGraphQL) The object itself does render but when I'm trying to access the nested data in the products object nothing renders //…
0
votes
0 answers

WP-GraphQL: Query by custom repeater field

I'm using the fantastic WPGraphQL plugin and also the WPGraphQL for ACF plugin. So far I have been able to query by an ACF custom field of type String, but now I want to query by another field (also String) inside a repeater field. When I add the…
Sean H
  • 1,045
  • 1
  • 14
  • 32