BryanJBryce
Configuring Ash Postgres to use usec date times
config :ash, :utc_datetime_type, :datetime
I’m doing this configuration in my project, I can’t remember why, it was probably in one of the official guides.
My question is: is this using millisecond or second precision timestamps? What other options are there instead of :datetime?
Marked As Solved
zachdaniel
Creator of Ash
Its referring to absinthe’s builtin :datetime type (the graphql type, not the ash type), which ISO8601 formats any given datetime, so IIRC it will have microseconds or not, depending on what the datetime given to it has.
1
Also Liked
zachdaniel
Creator of Ash
Ah, interesting…thats pretty frustrating. That should say config :ash_graphql, ...
Here is the relevant error message if its not set
No type configured for utc_datetimes!
The existing default of using `:naive_datetime` for `:utc_datetime` and `:utc_datetime_usec` is being deprecated.
To prevent accidental API breakages, we are requiring that you configure your selected type for these, via
# This was the previous default, so use this if you want to ensure no unintended
# change in your API, although switching to `:datetime` eventually is suggested.
config :ash, :utc_datetime_type, :naive_datetime
or
config :ash, :utc_datetime_type, :datetime
When the 1.0 version of ash_graphql is released, the default will be changed to `:datetime`, and this error message will
no longer be shown (but any configuration set will be retained indefinitely).
1
Popular in Questions
I have an umbrella app.
Some of the apps inside depend on other apps in the umbrella, unsurprisingly.
I’m writing a test for one of the...
New
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible.
total = 10
while total != 0
...
New
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
Hi!
Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1]
15:22:35.803 [error] gen_event {lager_file_backend...
New
Other popular topics
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine)
This is a plugin that adds support for Elixir to JetBrains IntelliJ...
New
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something…
Haskell reminds me of Java, and e...
New
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex










