Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Upsert fails silently #58

Open
slikts opened this issue Apr 1, 2020 · 0 comments
Open

Upsert fails silently #58

slikts opened this issue Apr 1, 2020 · 0 comments

Comments

@slikts
Copy link

slikts commented Apr 1, 2020

Working example: https://codesandbox.io/s/graphql-genie-upsert-issue-yckp9

  • IDL
  • Genie Version 0.4.24
  • Fortune Adapter fortune-indexeddb 1.1.2

Schema:

type Item {
  id: ID!
  user: User!
  content: String!
}

type User {
  id: ID!
  name: String! @unique
  fullName: String!
  created: DateTime @createdTimestamp
}

Mutation:

mutation {
  createItem(
    input: {
      data: {
        user: {
          upsert: {
            create: { name: "test" }
            update: { fullName: "Test T." }
            where: { name: "test" }
          }
        }
        content: "Lorem ipsum"
      }
    }
  ) {
    data {
      id
      user {
        name
        fullName
      }
      content
    }
  }
}

The upsert fails silently and the user is not inserted.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant