-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to identify why GraphQL fields are missing? #4271
Comments
Hi, currently there's not easy way to do it - I work on this ( #3905 ) but for now had to put in on hold to get more spare time to do some performance testing as this does change the way gatsby gathers field types from data. You best bet currently is to examine your wordpress REST endpoints - you can see them if you have verbose output enabled for wordpress plugin: it would be something like |
Hmm, I'm looking at the WP REST endpoints and I see all my fields there, including the |
@awesomebob Does every instance of that field return an array? I ran into this with one of my fields where it was returning a boolean for unset fields, which broke the type checking as @pieh described. |
@jlengstorf In this case, yes every instance. I've seen the boolean error several times as well, as recently as this morning:
|
Just throwing this out there, this is my only ACF field for which the value is an array of strings (checkbox field), could that be an issue? It was working just fine until this morning. |
Are arrays always arrays of string or are they are sometimes arrays of string, sometimes arrays of booleans? Array with mixed types is considered as mixed type too. You can try locally edit
in places where it returns |
@pieh thanks, I'm trying that now. My builds are taking much longer than usual, but hopefully I'll find something with this. My arrays should always be arrays of strings, but we'll see. |
It appears that some of my arrays are objects with numeric keys. possibly because they aren't strictly sequential indexes (indices?). The numeric keys are prefixed with
|
Context: I'm using gatsby-source-wordpress with lots of ACF fields
I frequently run into errors similar to this one: #4267
Most of the time I'm able to determine why a field is missing, usually because the field has a blank value on a single post somewhere.
Is there an easier way to determine why an ACF field is failing to compile to GraphQL? I'm already using
gatsby build --verbose
, is there an additional layer of verbosity I can add to the GraphQL step?I've tried looking in GraphiQL and the field is just missing, doesn't give me any additional information at this point.
The text was updated successfully, but these errors were encountered: