You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
graph_1 | 2019-08-15T11:53:40.519Z postgraphile:postgres begin
graph_1 | 2019-08-15T11:53:40.520Z postgraphile:postgres SAVEPOINT graphql_nested_mutation
graph_1 | 2019-08-15T11:53:40.521Z postgraphile:postgres select "id"
graph_1 | from "app"."asset"
graph_1 | where "id" = $1
graph_1 | 2019-08-15T11:53:40.524Z postgraphile:postgres update "app"."person" set "avatar_id" = $1
graph_1 | where (
graph_1 | "id" = $2
graph_1 | ) returning *
graph_1 | 2019-08-15T11:53:40.526Z postgraphile:postgres with __local_0__ as (
graph_1 | select *
graph_1 | from "app"."person"
graph_1 | where "id" = $1
graph_1 | )
graph_1 | select (
graph_1 | (
graph_1 | case when __local_0__ is null then null else __local_0__ end
graph_1 | )
graph_1 | )::text
graph_1 | from __local_0__
graph_1 | 2019-08-15T11:53:40.527Z postgraphile:postgres with __local_0__ as (
graph_1 | select (
graph_1 | str::"app"."person"
graph_1 | ).*
graph_1 | from unnest(
graph_1 | (
graph_1 | $1
graph_1 | )::text[]
graph_1 | ) str
graph_1 | )
graph_1 | select to_json(__local_0__."id") as "__pk__id"
graph_1 | from __local_0__ as __local_0__
graph_1 | where (TRUE) and (TRUE)
graph_1 | 2019-08-15T11:53:40.529Z postgraphile:postgres RELEASE SAVEPOINT graphql_nested_mutation
graph_1 | 2019-08-15T11:53:40.530Z postgraphile:postgres commit
graph_1 | 0 error(s) in 20.86ms :: mutation { updatePersonById(input: {id: "49b78602-b633-4f95-afc6-e279fa6de581", personPatch: {assetToAvatarId: {deleteById: {id: "1bb2f88c-3969-4400-9274-d1f467aea3bd"}}, avatarId: null}}) { clientMutationId } }
Additionally, if I set the avatar_id to null, and then rerun the above query, it connects the two records and sets the avatar_id to the id in deleteById.
The text was updated successfully, but these errors were encountered:
archlemon
changed the title
deleteBy<key> does not seem to be working correctly
deleteBy<key> does not seem to delete related records
Aug 15, 2019
archlemon
added a commit
to archlemon/postgraphile-plugin-nested-mutations
that referenced
this issue
Oct 21, 2019
I'm not sure if I'm not using it correctly, but I cannot get it to work as I'm expecting.
I have two tables:
Running the following mutation, I'd expect the asset to be deleted. (I'm also trying to set avatarId to null, for debugging the queries.):
This generates the following:
Additionally, if I set the
avatar_id
tonull
, and then rerun the above query, it connects the two records and sets theavatar_id
to the id indeleteById
.The text was updated successfully, but these errors were encountered: