You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the first post Gatsby queries (for a given post type) does not have ACF data assigned to it (if you have conditional fields, or you install ACF on an existing site), then GraphQL treats every post of that post type as if it has no ACF data (even though they can do). Presumably because it returns false instead of {}
This is what the WP API gives you back when you have no data:
{
"acf": false,
}
This is what the WP API gives you when you do have data:
{
"acf": {
"project_url": "https://..."
}
}
I spoke to Kyle and his thoughts were:
ok, this fix is easy then, gatsby-source-wordpress should just strip away the acf: false since that's useless to us
But I cannot figure out what I have to change to make this happen unfortunately.
The text was updated successfully, but these errors were encountered:
crgeary
changed the title
[gatsby-source-wordpress] ACF data cannot be queried
[gatsby-source-wordpress] ACF data cannot be queried if first post has no fields
Oct 16, 2017
If the first post Gatsby queries (for a given post type) does not have ACF data assigned to it (if you have conditional fields, or you install ACF on an existing site), then GraphQL treats every post of that post type as if it has no ACF data (even though they can do). Presumably because it returns
false
instead of{}
This is what the WP API gives you back when you have no data:
This is what the WP API gives you when you do have data:
I spoke to Kyle and his thoughts were:
But I cannot figure out what I have to change to make this happen unfortunately.
Using:
gatsby
:^1.9.36
gatsby-source-wordpress
:^2.0.12
Probably related to: #2417 and #2394
The text was updated successfully, but these errors were encountered: