Questions tagged [wp-graphql]
107 questions
1
vote
0 answers
Flatten Apollo response from WpGraphql in next.js
I'm trying to change the result that apollo returns with the data on the client side. I've read in the docs of version 3 that maybe this is possible. I currently have a graphql query that returns data within an EDGES array, and then each item is in…

Spencer Bigum
- 1,811
- 3
- 17
- 28
1
vote
0 answers
Can't get acf relationship field values in WP Graph QL
I am using WP graphql to retrieve data from a wordpress site, plus this extension to show acf fields in the graphql schema.
I am querying pages (I did set up a seperate graphql connection called destinations but it is the same as the pages type for…

OleG
- 11
- 1
1
vote
1 answer
Querying wordpress with meta queries from Gatsby
I'm trying to fetch data from my Wordpress backend using a meta query. I'm using this plugin:
https://www.wpgraphql.com/extenstion-plugins/wpgraphql-meta-query/
I can run my query in GraphiQL IDE in Wordpress, but not in Gatsbys GraphiQL tool.
I get…

Borje
- 255
- 5
- 19
1
vote
0 answers
How to proxy Headless Wordpress WPGraphQL Plugin Endpoint with NGINX?
I'm running a headless Wordpress instance and nginx is routing it to /adminon my website. On Wordpress I have the WPGraphql plugin installed and activated. GraphiQL is working and querying everything correctly, but I get a 404 page not found when…

Lucas Raza
- 499
- 1
- 4
- 13
1
vote
0 answers
WPGraphql Error: Unknown type "User" in Gridsome
I'm using WPGraphQL with Gridsome.
I am trying to query user avatar for post comments.
Here is my query
comments(where: {order: ASC}) {
edges {
node {
id
author {
node {
__typename
... on User …

Ali Seivani
- 496
- 3
- 21
1
vote
1 answer
wp-graphql - can't query acf globalOptions
I create a new field in Custom Fields and give it a location, like this:
After that I activate the Show In GraphQL button and set acf name:
Now, I'm trying to make a query for acf globalOptions in wp-graphql and it gives me an error. Moreover, I…

Daniel Barbakadze
- 201
- 2
- 14
1
vote
1 answer
dangerouslySetInnerHTML showing object on mapped data
I tried getting some values from an GraphQL data. Then, I want to display it via
Then, I got [object Object],[object Object],[object Object].
Here are my codes:
The error…

Adewale Perfect
- 553
- 1
- 5
- 12
1
vote
1 answer
Can't get nuxt-link to work when trying to render _slug.vue page with Nuxt, Apollo and WPGraphQL
I have a nuxt/vue app using apollo to query WPGraphQL on Wordpress. Im having hard time setting up my nuxt-link on my index page to route to my _slug.vue page. If I manually enter the url on the browser using the post's slug, I am able to render the…

Marvin
- 103
- 1
- 8
1
vote
1 answer
Nextjs - Children in WPGraphQL query for menus are null
WPGraphiQL IDE displays correct data like this:
but when I make the same query with Apollo Client on the Front-End the children of menu returns null.
Getting data with query
import { useApollo } from "../lib/apolloClient";
import { initializeApollo…

Daniel Barbakadze
- 201
- 2
- 14
1
vote
1 answer
gatsby-source-graphql only shows 10 results
I'm want to fetch data from a wordpress site and currently when I pass the query to show all the pages the site has it only returns 10 of 64, is there an option under gatsby-source-graphql resolver in gatsby-config.js to show more results?

Ariel Navarro
- 21
- 4
1
vote
0 answers
GatsbyJS/WordPress add support logo GraphQL
I'm trying to add custom logo to my GatsbyJS site but having issues to query the logo in GraphQL. The site is build with gatsby-source-graphql & WPGraphQL WordPress plugin. I've added theme support in my WordPress functions.php with below…

TurboTobias
- 595
- 3
- 19
1
vote
1 answer
combining page queries in GatsbyJS/GraphQL
How can I combine two page queries in GraphQL? I tried simply just combining the data I need into a single query but it keeps giving me an error "TypeError: Cannot read property 'pages' of undefined". My thought was that either my query is simply…

TurboTobias
- 595
- 3
- 19
1
vote
0 answers
GraphQL fragments for wp-graphql Gutenberg Blocks
If I have a query that starts like this:
export const pageQuery = graphql`
{
homepage: wordpress {
pages(where: { title: "Homepage" }) {
nodes {
isFrontPage
blocks {
name
... on WORDPRESS_CoreHeadingBlock {
…

jacobdubail
- 194
- 2
- 13
1
vote
4 answers
wordpress: wp-graphql not working with custom post type
I've created a custom post type that is however not showing up in the GraphiQL explorer.
function create_custom_visions_post_type() {
register_post_type('visions',
array(
'labels' => array(
…

nerdess
- 10,051
- 10
- 45
- 55
1
vote
0 answers
Wordpress Custom Post Type not being added after register_post_type with wp-graphql
I am using the GraphiQL to test if my custom post types are being added to GraphQL.
Rankings is displayed on my navigation in WP-Admin, I can add/edit/delete items so I know the CPT is working. However I cannot see it in GraphiQL
function.php
new…

Jamie Hutber
- 26,790
- 46
- 179
- 291