What is NQuad count and how can I increase it's limit?

Same behavior on:

Dgraph version   : v20.11.0-rc1-17-g844a6476
Dgraph codename  : unnamed
Dgraph SHA-256   : f0af29f77fd63065b855dde5005a882342f00df869ebf17248ce16a9866743c8
Commit SHA-1     : 844a6476
Commit timestamp : 2020-11-12 18:02:32 +0530
Branch           : master
Go version       : go1.14.4
jemalloc enabled : true

Sorry, but I don’t get the relation to my issue here?

My mutation looks like this:

- mutation deleteDocument($ids: [ID!]) {
+ mutation deleteDocument($ids: [String!]) {
        deleteDocument(filter: { id: {in: $ids }}) {
          document {
            id
            title}}}

~~
Note the in keyword

1 Like

Hi @maaft, you don’t need in for specifying an array of ids. Graphql will return the below error if you try to do it because in filter is defined for array of type strings.

"message": "Field \"in\" is not defined by type ID.",

you can do it like below.

mutation deleteDocument($ids: [ID!]) {
        deleteDocument(filter: { id: $ids }) {
          document {
            id
            title
         }
      }
  }

@JatinDevDG
My types are defined as:

type Foo {
   id: String! @id
   ... 
}

type Bar {
   id: String! @id
   ...

The reason is that I need to generate the IDs on the client to allow for database (offline/online) synchronisation.

Is this very long list the reason why the NQuad error arises?

ok, if the $ids are of type string then you should use a variable of type [String!] not of type [ID!] as below.

mutation deleteDocument($ids: [String!]) {
        deleteDocument(filter: { id: {in: $ids }}) {
          document {
            id
            title
          }
      }
 }

Sure, I just copied the mutation from @alexanderkomeiji and forgot to switch out the ID type. Thank you for the heads-up. Will update my comment.

Do you have an idea why I get the error mentioned in my first two posts?

We need to reproduce the error that you got and then will get back to you.

Thank you. Sorry that I couldn’t come up with a short schema example that reproduces this. (Note that the schema I posted probably works). I suspect that it has to do something with @auth directives which I also use.