Questions tagged [wp-graphql]
107 questions
2
votes
0 answers
Vue3 Beginner Stuck Trying to Get Apollo-Vue Working w/WPGraphQL on a WordPress CMS Web App
I'm trying to build a website using Wordpress as my backend, WPGraphQL & Apollo-Vue, and Vue for my frontend. It's going ok so far, but Apollo is causing me a lot of grief. I opted to go for Vue3 since it seems that's the future for the library, and…

Cmaxster
- 1,035
- 2
- 11
- 18
2
votes
1 answer
Custom field not saved
I try to add a custom user field to the user by using WPGraphQL. Therefore I tried to recreate the example in the official WPGraphQL documentation https://docs.wpgraphql.com/extending/fields/#register-fields-to-the-schema…

Jakob Meusburger
- 148
- 9
2
votes
0 answers
Error: Network error: Unexpected end of JSON input in usemutation Hook In Next.js
Next.js, Graphql, wpgraphql, useMutation hook,material-UI
I try to buid the WordPress theme use next.js and graphql.
I try lots of testing, reading to kind resolve my error.
my domain path:https://blog.rajdeepsingh.dev/graphql
local server:…

officialrajdeepsingh
- 422
- 9
- 20
2
votes
2 answers
gatsby-source-graphql + ACF fields not showing up
I'm wondering why my ACF fields are not showing up in my gatsby app using the gatsby-source-graphql plugin? My ACF fields show up when I use the WP plugin: WP GraphiQL, but not when I run my gatsby app. Can I only import ACF fields using…

Spencer Bigum
- 1,811
- 3
- 17
- 28
1
vote
2 answers
WPGraphQL query variables not updating data
I'm trying to add a "Load More" feature to my blog posts page using Apollo/GraphQL/React, and am following the exact instructions founds here. However when I click on the load more button, it doesn't load any additional posts, and doesn't seem to…

bk___
- 71
- 10
1
vote
1 answer
Nextjs 13 beta vercel static build error using Wordpress GraphQL
I faced a problem while creating static pages in Next JS with GraphQL requsts using fetch.
I've created page where I render list with over 100 items and also created static dynamic pages for those items using generateStaticParams function provided…

Luke Luke
- 21
- 3
1
vote
1 answer
getting localStorage data so that I can pass it to apollo query variables but skip query if the variable is empty
I save product ids in a localstorage to be used in recently viewed component.
My Recently viewed component is below
import { useQuery } from "@apollo/client";
import { getRecentlyViewedProductArr } from "@gb-utils/product/product"
import {…

jameshwart lopez
- 2,993
- 6
- 35
- 65
1
vote
1 answer
Gatsby shows page not found and then loads the content of the page on
I'm not really sure where the problem is, I'm using amazon cloud, s3 bucket to host the website with cloudfront and WordPress as CMS
I thought Gatsby will create a static page but it looks like is injecting the content, the homepage looks ok but any…

Marcogomesr
- 2,614
- 3
- 30
- 41
1
vote
0 answers
Problem to get an image in a blogpost with NextJS and WpGraphQL
I have another question in the project I'm doing, using NextJS to create a site with a blog part in Wordpress, through WPGraphQL, and I need support in a specific part. Let's go...
I managed to pull the highlighted image with almost no problems, I…

Ricardo Ramos
- 11
- 1
1
vote
0 answers
wp-graphql: How do I get data from custom post types?
I'm experimenting with Gatsby.
On the WordPress side I've installed the plugin wp-graphql.
(I've also installed wp-graphql-acf, because I've got some ACF fields that I want to expose )
I have two CPT's. For both of the CPT's I've passed the…

bob
- 753
- 4
- 15
- 27
1
vote
1 answer
Filter nested objects in WPGraphQL
I'm using WPGraphQL to interact with a vanilla wordpress backend. gatsby-source-wordpress is used as a client.
What I would like to achieve with my query:
for a list of category ids, give me a list of posts that belong to each category
each list of…

panepeter
- 3,224
- 1
- 29
- 41
1
vote
1 answer
How i can resolve conflict type AcfLink
I have a problem with Gatsby, I have a type conflict in Link relation in WordPress
Fields "button" conflict because they return conflicting types AcfLink and String. Use different aliases on the fields to fetch both if this was intentional.
Error…

madseven
- 9
- 1
1
vote
1 answer
How to make WordPress work exclusively with WPGraphQl and block all the other routes?
I am using WordPress exclusively as a backoffice for my Next-js app.
I only need 3 endpoints:
https://mydomain/graphql/*
https://mydomain/wp-admin/*
https://mydomain/wp-content/*
I don't want to have anything else accessible. Is it somthing I…

Vincent Roye
- 2,751
- 7
- 33
- 53
1
vote
0 answers
Accessing Wordpress Divi theme shortcodes in GraphQL layer as part of headless Wordpress build
I am working on an existing Wordpress site that uses a Divi child theme with the editor creating layouts with the Visual Editor. The client wants to develop a Gatsby site with data from a GraphQL layer provided by the wp-graphql plugin.
When I…

user2978728
- 13
- 1
- 5
1
vote
2 answers
WPGraphQL/GraphQL custom post type filter
I have created custom post type with 2 taxonomies, which I want to filter first by country taxonomy and then by practice area taxonomy. The problem is that I'm not allowed (can't find how to do it in docs) to do filtering in one step. The goal is to…

asdasd
- 63
- 1
- 8