hasura/graphql-engine

Mutation returns relationship data like before the mutation took effect

pyankoff opened this issue · 1 comments

I have many-to-many relationship and when I insert new row in the linking table, mutation works, but the relationship data in returning field comes back like it was before the update.

Example code (both reactionUsers and reactionUsers_aggregate are like before the update):

mutation addReaction($reactionId: Int!, $userId: Int!) {
    insert_user_reaction(objects: {
      user_id: $userId,
      reaction_id: $reactionId
    }) {
      returning {
        reaction {
          id
          icon
          reactionUsers_aggregate {
            aggregate { count }
          }
          reactionUsers {
            user_id
          }
        }
      }
    }
  }

I think it worked properly in an older hasura version, now using alpha37.

@rakeshkky @dsandip please verify if this a bug and lets triage quickly?