Variable Default Type Mismatched for Value int64

Report a GraphQL Bug

What edition and version of Dgraph are you using?


  • SlashGraphQL
  • Dgraph (community edition/Dgraph Cloud)

Have you tried reproducing the issue with the latest release?


Steps to reproduce the issue (paste the query/schema if possible)

type Post {
  id: ID
  title: String
query limitPosts($first: Int = 2) {
  queryPost(first: $first) {

Expected behaviour and actual result.

  "data": {
    "queryPost": []
  "errors": [
      "message": "Type mismatched for Value `<int64 Value>`, expected:`Int`",
      "path": [

This does appear to be a bug. Accepting it.

1 Like

Hi @verneleem, this bug is fixed in the master branch and also in 20.11.02.
We recently refactored a code regarding variable handling which fixed this and many other related
PR: fix(GraphQL): Fix panic caused by incorrect input coercion of scalar to list by JatinDevDG · Pull Request #7405 · dgraph-io/dgraph · GitHub