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

Add note to Date and Time custom types indicating acceptable values #708

Merged
merged 1 commit into from
Apr 19, 2019

Conversation

paradox460
Copy link
Contributor

Add a note to the Date and Time custom types indicating that they do
not
accept Time and date values respectively.

Date.from_iso8601("2019-04-15T11:55:15")
# => {:error, :invalid_format}

Date.from_iso8601("2019-04-15")
# => {:ok, ~D[2019-04-15]}

Time.from_iso8601("2019-04-15T11:55:15")
# => {:error, :invalid_format}

Time.from_iso8601("11:55:15")
# => {:ok, ~T[11:55:15]}

Some platforms, such as iOS Apollo, cast Date/Time to types native to that platform. Swift Date accepts full ISO8601:2019 datetime stamps.

Add some custom formatting notes to the Date and Time Custom types, to
indicate that they do not accept Time or Date components respectively.
@bruce bruce self-assigned this Apr 17, 2019
@bruce bruce added this to the v1.5 milestone Apr 17, 2019
@bruce
Copy link
Contributor

bruce commented Apr 19, 2019

Good and helpful distinctions, thank you Jeff!

@bruce bruce merged commit 8a27cb3 into absinthe-graphql:master Apr 19, 2019
@paradox460
Copy link
Contributor Author

Happy to help!

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 this pull request may close these issues.

2 participants