-
Notifications
You must be signed in to change notification settings - Fork 3
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 on date field with end-date #13
Comments
Post your GraphQL query and field config so I can dig deeper |
What do you mean exactly by field config? I've renamed the fields to better explain the entity and field types. |
On a simpler query, the result is the same.
|
You add a field date, you need select field type, field name, default value, timezone handling, start/end date .... What did you use for your field? graphql_api resolve to string when we have no clue about schema types of given field type |
I add a field of type 'date' (https://www.drupal.org/project/date). Add a field name, default value of 'now'. Timezone handling set to the same as the website. Set field to record year, month, day, hour, and minute. When using only start-date, graphql_api returns a datetime string. When set to also record an end-date, then graphql_api returns the error mentioned above. Thank you for looking into it! |
@olragon any news here for using start/end date values in date field? |
@Jehu I've been busy for the last week, try to fix in tomorrow |
It should be fixed by c1590e8 |
Hi,
we're really enjoying using graphql_api with drupal, thanks so much!
Currently having an issue with date-fields which contain start and end dates - the schema is expecting a string, but receives an object (or array) and returns an error.
"debugMessage": "Expected a value of type \"String\" but received: {\"value\":\"2018-07-06 00:00:00\",\"value2\":\"2018-07-30 00:00:00\",\"timezone\":\"Europe\\/Paris\",\"timezone_db\":\"Europe\\/Paris\",\"date_type\":\"datetime\"}",
When using a date-field with a start date only, the query returns the datestamp as expected, but in this case it would be great to also access the timezone data.
Are you planning to support this? Or could you give any suggestion for how to add the correct schema data for all the date field info?
Thanks!
The text was updated successfully, but these errors were encountered: