Skip to content

Delete by multiple primary keys #49

Open
@Eldow

Description

I found an issue while performing delete mutations from multiple primary keys :

       deleteByCarIdAndBrandId: [
          {
            carId: 514,
            brandId: 43
          }
        ]

Pg compiler outputs an error : Unpexcted character ')'

After some reseach, I looked at the computed query and it looks like this :

delete from "public"."Cars"\n' +
                where \n' +
                    "car_id" = $1\n' +
                  ) and (\n' +
                    "brand_id" = $2\n' +

Fixed it by wrapping the where clause inside parenthesis.

Let me know if I should make a PR for this !

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions