Closed Bowriverstudio closed 5 months ago
@Bowriverstudio In order for GraphQL to support array types, the GraphQL Schema needs to know what Type of Scalar (string, int, etc) or Type(s) can be returned by the array.
In order to support this, attribute fields of the array type would need to specify the GraphQL List of Type manually since blocks can simply register attributes as "array" without further definition.
I believe you might be able to accomplish what you're after by using existing filters within WPGraphQL to support this on a case-by-case basis.
@jasonbahl
Thank you. I'll explain the issue I'm having in more detail.
Image Field: Background Image
Repeater Field: Team Members
Number Field: Total Projects
Number Field: Total Clients
Number Field: Total Tech
Use ACF with renderTemplate
:
Use ACF with a Custom Parser:
<?php if ($is_preview): ?>
Render the block like option one.
<?php else: ?>
Render out a custom tag with the data I need;
Then use a Parser to Convert Some Blocks to Components
https://wpengine.com/builders/gutenberg-in-headless-wordpress-render-blocks-as-html
<?php endif; ?>
Ask for Best Practices:
@Bowriverstudio if you're using ACF Blocks have you tried WPGraphQL for ACF?
@jasonbahl - Thank you I just did and it is works well thank you.
This link says https://github.com/wpengine/faustjs/issues/1522
What is the current status of this?
Thanks