acf-to-rest-api icon indicating copy to clipboard operation
acf-to-rest-api copied to clipboard

Repeater cannot be found in Graphql

Open D19cannon opened this issue 5 years ago • 3 comments

Hi guys,

I have been working on a project for while with a headless WP and Gatsby front-end. This is my 3rd project or so. This time I am trying to create a template to make it work with woocommerce, however, I ran into this interesting problem.

Whenever I create a repeater in a this flexible content it will not show or be added to the graphql schema. But when I change it to a text field for example is works just fine.

Ironnicaly, it does work in a different Flexible field, but then when queried in in the application it doesn't return anything, but in the graphiql it returns the values just fine.

See the screen shot (lijst == repeater and when changed to text like others it works): Screenshot 2019-12-16 at 18 05 20

Has there been an update lately that could've affected the repeater field in some way?

Thanks for you help in advance.

D19cannon avatar Dec 16 '19 16:12 D19cannon

Quick update to make myself a bit more clear.

childWordPressAcfDetails has a repeater --> adv_fields childWordPressAcfProductDetails suppose to have a repeater --> lijst (but won't show)

Screenshot 2019-12-16 at 19 24 57

D19cannon avatar Dec 16 '19 17:12 D19cannon

Same here! Repeater is not showing up in graphql list.. other fields are working fine..

reinisg avatar Apr 05 '20 14:04 reinisg

Same here! Repeater is not showing up in graphql list.. other fields are working fine..

I found the problem. WP some how doesn’t update the ACF.json file. To fix it, go to that file change whatever you need to change (text to repeater for all I care) and change the update time stamp at this given moment (if I remember correctly at the bottom of the json file) in unix.

I think that was it. If not you might need to store the acf.json file in a specific directory.

D19cannon avatar Apr 06 '20 15:04 D19cannon