wp-graphql / wp-graphql-acf

WPGraphQL for Advanced Custom Fields
https://wpgraphql.com/acf
626 stars 123 forks source link

Possible to set graphql_field_name option in GUI? #332

Closed jackgregory closed 1 year ago

jackgregory commented 2 years ago

I have a few of fields which field names start with a number, but this throws an error "The field '1280720' on Type 'Project_Afcprojectsettings_FeaturedGfxList_Src' is invalid. Field names cannot start with a number."

When registering with php or json I can set graphql_field_name to avoid this error. But cant do this with the admin fields. Could it be added as an option?

jasonbahl commented 1 year ago

@jackgregory this has been added to the re-write of the plugin being worked on over here: https://github.com/wp-graphql/wpgraphql-acf.

When using the new WPGraphQL for ACF + ACF 6.1+ each field now has a "GraphQL" tab where you can set things like this on a per-field basis:

CleanShot 2023-07-11 at 21 51 10

I'm closing this issue as it is now supported in the new version (which will be released on WordPress.org in the near future and this repo for the old version of the plugin will be archived)