Closed cosmicespresso closed 3 years ago
@TylerBarnes after our recent discussion on the MediaItem issue I opened on https://github.com/wp-graphql/, I came back to this and noticed that the url
result from the same query is different on WP GraphiQL and on local dev. Above I am querying for the nodes of the (only) Menu I have built on WP. I have also made sure it has an assigned location etc (it had been an issue in the past).
Here's what I get for the first MenuItem node:
WP GraphQL: https://icd.wordsinspace.net/2020/12/02/glimmer-refracting-rock/
(correct)
local dev: /2020/12/02/glimmer-refracting-rock/
🤔
Not sure if this has to do with how URLs are parsed by the plugin, but I wanted to bring it up. Thanks!
@Kallirroi thanks for asking - the plugin does replace any URL's and make them relative paths for ease of linking between pages/nodes.
I have a fix coming for this btw!
I have a canary with a solution here gatsby-source-wordpress@5.2.0-alpha-wordpress.34+e45fa4b460
. Should be finished and merged next week!
I have a canary with a solution here
gatsby-source-wordpress@5.2.0-alpha-wordpress.34+e45fa4b460
. Should be finished and merged next week!
That's awesome, thanks so much!
On
http://localhost:8000/___graphql
when I add theconnectedNode
in the query below:I get the following error:
Notice how it returns the (somewhat) correct results, but the last two nodes have a
node: null
.Expected behaviour Here is how it's supposed to work, via WP GraphiQL:
output:
gatsby info