Skip to content
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

Error when using Carbon Map field #15

Open
plamenradev opened this issue Feb 7, 2022 · 0 comments
Open

Error when using Carbon Map field #15

plamenradev opened this issue Feb 7, 2022 · 0 comments

Comments

@plamenradev
Copy link

Hey,
I'm trying to work with Map carbon field, but when use wpgraphql to retrieve the value it returns an error, because it expects string, but the returned value from map field is array with 5 items (value, lat, lng, zoom, address).

Field::make('map', 'location', __('Location', 'crb'));

I could use graphql_resolve_field filter to return $result['value'] as a string. In my case (where the field name is 'location') I can not choose nested nodes (value, lat, lng, zoom or address), I have just "location".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant