I am trying to build an application with django and graphene and I want to set a default value for one of the fields in my model. The mutation is really straight forward. I've passed all the required arguments as objects and the optional ones with **kwargs
.
Django's docs on **options
for models.UUIDField()
says that if None type object is sent to the model field, default value will be used.
When I try to use my mutation without passing any values/ passing None as a value to the argument, I get graphql.error.located_error.GraphQLLocatedError: NOT NULL constraint failed: games_game.groupid error is raised.
Here is a pastebin for Tracebacks, models.py
and schema.py
to my project.