Where to get error Stacktrace?

While using the graphic query interface I got this msg:

  "errors": [
    {
      "message": "Internal Server Error - a panic was trapped.  This indicates a bug in the GraphQL server.  A stack trace was logged.  Please let us know by filing an issue with the stack trace."
    }
  ]
} 

where can I check this stacktrace?

It should be there as a panic in the dgraph alpha logs`. So check the logs and share with his so that we can look into it.

I’m not sure if it is possible on the SlashQL deployment. I’m trying to find it on the slash dashboard and also with the slash CLI but didnt get it yet.

The references I’ve found on the docs for logging seem to work only for deployed dgraph versions but not for the hosted version (slash).

Maybe I missed something. If you can share some document about it would be great.

Thanks!

Hey @brmaeji,

This feature isn’t supported in slash yet. I’m not able to see any deployments created by you.
Can you please try to create another deployment, and notify me about it? I’ll be able to provide you the logs for that one.

1 Like

Hey @brmaeji

Apologies for taking a few days to get back to you. We were able to get the logs and this is indeed a bug. We are trying to reproduce this on our end. Would it be possible for you to share the mutation which caused this and if possible the type definition of the nodes that you were trying to modify?

Once we are able to reproduce this, we should have a fix in a day or two.

hey @brmaeji

Would it be possible for you to share the mutation which caused this and if possible the type definition of the nodes that you were trying to modify?

hey @pawan, I’m trying to find it but I think it got lost in some notes file I overwrote with my last tests… sorry about that. I’ll try to reproduce it - I’m almost sure it was a GraphQL query that used both set and remove on the same property and that was the problem.

Hey @pawan,

I got the same issue, I’m using Slash GraphQL too and these kind of mutations are failing with the same error message

Internal Server Error - a panic was trapped.  This indicates a bug in the GraphQL server.  A stack trace was logged.  Please let us know by filing an issue with the stack trace.

My mutations are:

mutation MyMutation {
  updateSubject(input: {filter: {id: "0x4"}, set: {topics: {name: "Respiration"}}}) {
    subject {
      name
      topics {
        name
      }
    }
  }
}

or this one

mutation MyMutation {
  updateSubject(input: {filter: {id: "0x4"}, set: {name: "Biology KS3"}}) {
    subject {
      name
      topics {
        name
      }
    }
  }
}

And part of the schema is:

type Subject {
    id: ID!
    name: String!
    topics: [Topic]! @hasInverse(field: subject)
}

type Topic {
    id: ID!
    name: String!
    subTopics: [SubTopic]! @hasInverse(field: topic)
    subject: Subject!
}

Thank you very much

1 Like

@eianc,

It looks like you have a syntax error in your GraphQL. Instead of:

filter: {id: "0x4"}

use

filter: {id: ["0x4"]}

The Docs on Slash API Explorer can help with the expected syntax:

image

Thanks @eianc

Confirmed that this is a bug, the server shouldn’t panic. @JatinDevDG is looking into this.

Hey @amaster507 @pawan,

Thank you for replying so quickly :slight_smile:
You are right, if I pass the id as an array the mutation works, however there is still a bug in the Api Explorer or somewhere.

Please see


this works - but the id is not showing anymore in the API Explorer, as it does when is not wrapped in an array

Yes there is a bug in that panel.

Hi @eianc, we have fixed this bug. Now you can pass a single object and that will be coerced to the list if the required type is of list.
PR:https://github.com/dgraph-io/dgraph/pull/7133

1 Like

Thank you @JatinDevDG
I saw that your code has been merged, but I’m still getting the error on my mutations in the API Explorer :slight_smile:
I’m using Slash GraphQL, I did a hard refresh and cleared the cache in the browser.
Is there something else I should do to see your changes?

@eianc, ohhh, These changes are merged in master branch. And Slash is using 20.11 release. We will include these changes in 20.11 in next patch release then update slash to that.

Great - thanks a lot @JatinDevDG

Ran into same problem, the fix hasn’t been rolled out yet right?
Looks like I am on: v20.11.0-rc2