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

Unable to parse time.Time instance #522

Closed
asaf opened this issue Oct 28, 2019 · 0 comments · Fixed by #523
Closed

Unable to parse time.Time instance #522

asaf opened this issue Oct 28, 2019 · 0 comments · Fixed by #523

Comments

@asaf
Copy link

asaf commented Oct 28, 2019

Hey,

Assuming an argument named time is set to DateTime scalar type,

A query such:

query Q($time: DateTime) {
  someField(time: $time) {
   ...
  }

Where variables are:

{
	"time": "2017-07-23T03:46:56.647Z"
}

Would fail with the error: Variable "$time" got invalid value "2017-07-23T03:46:56.647Z". Expected type "DateTime", found "2017-07-23 03:46:56.647 +0000 UTC".
`

This happens because the unserialization of DateTime does not take into consideration an instance of time.Time.

Related to #250

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

Successfully merging a pull request may close this issue.

1 participant