BUG: 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


Report a GraphQL Bug

What edition and version of Dgraph are you using?

Edition:

  • SlashGraphQL
  • Dgraph (community edition/Dgraph Cloud)
Dgraph Version
Image: dgraph/dgraph:latest

Have you tried reproducing the issue with the latest release?

Yes


I0309 22:25:58.811157 17 http.go:243] namespace: 0. Got GraphQL request over HTTP.
I0309 22:26:00.623302 17 http.go:243] namespace: 0. Got GraphQL request over HTTP.
I0309 22:26:01.509870 17 http.go:243] namespace: 0. Got GraphQL request over HTTP.
I0309 22:26:01.650455 17 http.go:243] namespace: 0. Got GraphQL request over HTTP.
E0309 22:26:01.651208 17 panics.go:34] panic: runtime error: invalid memory address or nil pointer dereference.
query: mutation {
addPaymentMethodType(input: {type: {id: “0x850ee6e”}, name: “Test name”, website: “test website”, established_year: 2016, owner: “Test Owner”}) {
numUids
}
}

trace: goroutine 2444099 [running]:
runtime/debug.Stack()
/usr/local/go/src/runtime/debug/stack.go:24 +0x65
github.com/dgraph-io/dgraph/graphql/api.PanicHandler(0xc00052b508, {0xc0185e5110, 0xce})
/ext-go/1/src/github.com/dgraph-io/dgraph/graphql/api/panics.go:34 +0x66
panic({0x1e4e280, 0x32d4850})
/usr/local/go/src/runtime/panic.go:1038 +0x215
github.com/dgraph-io/dgraph/graphql/resolve.existenceQueries({0x2529208, 0xc02de16600}, {0x2566218, 0xc0042f06d8}, {0x0, 0x0}, 0x8, 0xc02de170e0, 0xc016098420)
/ext-go/1/src/github.com/dgraph-io/dgraph/graphql/resolve/mutation_rewriter.go:1958 +0xa0c
github.com/dgraph-io/dgraph/graphql/resolve.(*AddRewriter).RewriteQueries(0xc02de16e70, {0x2529208, 0xc02de16600}, {0x25716c0, 0xc02de16e40})
/ext-go/1/src/github.com/dgraph-io/dgraph/graphql/resolve/mutation_rewriter.go:333 +0x33f
github.com/dgraph-io/dgraph/graphql/resolve.(*dgraphResolver).rewriteAndExecute(0xc016098360, {0x2529208, 0xc02de16600}, {0x25716c0, 0xc02de16e40})
/ext-go/1/src/github.com/dgraph-io/dgraph/graphql/resolve/mutation.go:274 +0x40f
github.com/dgraph-io/dgraph/graphql/resolve.(*dgraphResolver).Resolve(0xc004fd1590, {0x2529208, 0xc02de16600}, {0x25716c0, 0xc02de16e40})
/ext-go/1/src/github.com/dgraph-io/dgraph/graphql/resolve/mutation.go:201 +0x427
github.com/dgraph-io/dgraph/graphql/resolve.(*RequestResolver).Resolve(0xc01911be60, {0x2529208, 0xc02de164b0}, 0xc01a843a40)
/ext-go/1/src/github.com/dgraph-io/dgraph/graphql/resolve/resolver.go:601 +0xcab
github.com/dgraph-io/dgraph/graphql/admin.(*graphqlHandler).ServeHTTP(0xc007f464b0, {0x2514aa8, 0xc01af1ab60}, 0xc019d16800)
/ext-go/1/src/github.com/dgraph-io/dgraph/graphql/admin/http.go:279 +0x36f
github.com/dgraph-io/graphql-transport-ws/graphqlws.NewHandlerFunc.func1({0x2514aa8, 0xc01af1ab60}, 0xc019d16800)
/go/pkg/mod/github.com/dgraph-io/graphql-transport-ws@v0.0.0-20210511143556-2cef522f1f15/graphqlws/http.go:40 +0x7b
net/http.HandlerFunc.ServeHTTP(0x1f3e1a0, {0x2514aa8, 0xc01af1ab60}, 0xc)
/usr/local/go/src/net/http/server.go:2046 +0x2f
github.com/dgraph-io/dgraph/graphql/admin.commonHeaders.func1({0x2514aa8, 0xc01af1ab60}, 0x0)
/ext-go/1/src/github.com/dgraph-io/dgraph/graphql/admin/http.go:387 +0xfc
net/http.HandlerFunc.ServeHTTP(0xe3d0ef, {0x2514aa8, 0xc01af1ab60}, 0x8)
/usr/local/go/src/net/http/server.go:2046 +0x2f
github.com/dgraph-io/dgraph/graphql/admin.recoveryHandler.func1({0x2514aa8, 0xc01af1ab60}, 0x0)
/ext-go/1/src/github.com/dgraph-io/dgraph/graphql/admin/http.go:400 +0xbd
net/http.HandlerFunc.ServeHTTP(0x1f3e1a0, {0x2514aa8, 0xc01af1ab60}, 0x8)
/usr/local/go/src/net/http/server.go:2046 +0x2f
github.com/dgraph-io/dgraph/dgraph/cmd/alpha.setupServer.func1({0x2514aa8, 0xc01af1ab60}, 0xc019d16800)
/ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/cmd/alpha/run.go:691 +0x186
net/http.HandlerFunc.ServeHTTP(0xd987ee, {0x2514aa8, 0xc01af1ab60}, 0x9)
/usr/local/go/src/net/http/server.go:2046 +0x2f
net/http.(*ServeMux).ServeHTTP(0xc016604125, {0x2514aa8, 0xc01af1ab60}, 0xc019d16800)
/usr/local/go/src/net/http/server.go:2424 +0x149
github.com/dgraph-io/dgraph/ee/audit.AuditRequestHttp.func1({0x2514aa8, 0xc01af1ab60}, 0xc0826840e43437ba)
/ext-go/1/src/github.com/dgraph-io/dgraph/ee/audit/interceptor_ee.go:94 +0xe2
net/http.HandlerFunc.ServeHTTP(0xc082683e643437ba, {0x2514aa8, 0xc01af1ab60}, 0xc01af1ab60)
/usr/local/go/src/net/http/server.go:2046 +0x2f
net/http.(*ServeMux).ServeHTTP(0x0, {0x2514aa8, 0xc01af1ab60}, 0xc019d16800)
/usr/local/go/src/net/http/server.go:2424 +0x149
net/http.serverHandler.ServeHTTP({0x250f300}, {0x2514aa8, 0xc01af1ab60}, 0xc019d16800)
/usr/local/go/src/net/http/server.go:2878 +0x43b
net/http.(*conn).serve(0xc018829040, {0x2529208, 0xc000188210})
/usr/local/go/src/net/http/server.go:1929 +0xb08
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:3033 +0x4e8
I0309 22:26:02.398399 17 http.go:243] namespace: 0. Got GraphQL request over HTTP.
I0309 22:26:04.321498 17 http.go:243] namespace: 0. Got GraphQL request over HTTP.
I0309 22:26:06.011963 17 http.go:243] namespace: 0. Got GraphQL request over HTTP.
I0309 22:26:07.674856 17 http.go:243] namespace: 0. Got GraphQL request over HTTP.