Closed cschroeter closed 7 years ago
Can you confirm which value of PostGraphQL you're using? Specifically I'm interested to know if the issue occurs in both @latest
and @next
or only one. You can run the specific versions via npx
without messing up your environment; e.g.
npx postgraphql@latest -c postgres://...
npx postgraphql@next -c postgres://...
(This seems to be kind of the opposite of #584)
Works with @next not with @latest :)
I'm probably not going to fix it then; but if you wish to open a PR to fix this in v3 please do.
More information on postgraphql@next
is available in #506; it's still in alpha currently but is already quite widely used and seems stable (though new versions might bring small breaking changes until it goes on general release).
Thanks for the fast response. I am fine with using @next version. Keep up the good work. It is an amazing library !
👍 Closing as fixed in v4.
Hi, I have the same issue. Using postgraphql 3.5.0 as a middleware. Column create_at default now() returns empty value when creating new rows from postgraphql.
I'd be happy to merge a PR that fixes this for v3. If you're happy running a late alpha, you can also try v4 with npm install postgraphql@next
(see #506) but beware that (subtle) schema changes are still possible at this stage.
Sorry, Benjie! Just figured it out. Removed postgraphql from dependencies and installed postgraphile. Now it works like a charm.
This works fine with the middleware but has not been applied for the CLI though.
What do you mean? The “postgraphile” CLI just calls the “postgraphile” middleware. If you think you’ve found a bug, please open a new issue.
Hello, Is there a way to apply now() on a date time field on update without creating a trigger?
Trigger is the cleanest way to do it, but you could do something like this: https://www.graphile.org/postgraphile/plugin-gallery/#Mutation_wrappers__OverrideArgValuePlugin
Given the following schema:
If I add a user like this
a valid user with an id, name and timestamp has been created. But If i use graphiql with this mutation
the createdAt field is null.