Hello fellas, would anyone know why the value of something in gql has hyphens and commas replaced with underscores? This does not occur when accessing data with REST
This is because GraphQL doesn't allow dashes
nothing Payload can do there unfortunately. To keep parity, I would avoid using dashes in field names
use camelCase instead
or undrescores, either way
so just to clarify, is that just for strings that are prefixed with a hyphen? i.e. i just can't start a value with a -
any hyphen at all, anywhere
doesn't need to be prefixed
my-field
will be turned into
my_field
sorry to clarify this is for the value of a field, not a field name in itself
like a select field for example?
yep, same thing applies there as well. select values / radio values are
enum
s in graphql
and enums can't have dashes either
ah ok makes sense
thank you