Skip to content

edsrzf/gqlgen-null-repro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a small reproduction case for a bug in gqlgen 0.9.1, where null values are not bubbling up correctly through arrays of non-nullable elements.

To reproduce the bug, run:

go run server/server.go&
# wait until server is ready, then run:
curl -H 'Content-Type: application/json' -d '{"query": "{ todos { user { name } } }"}' http://localhost:8080/query

You should see:

{"errors":[{"message":"oh no","path":["todos",0,"user"]}],"data":{"todos":[null]}}

The part to focus on is "todos":[null], which should not be allowed according to the schema.

About

Reproduction of a bug in gqlgen

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages