hello i wanted to upload images and files in graphene , i am bit confused here in what i want to do... here is my code below seems like its not working i installed package graphene file upload
schema.py
class Users_Type(DjangoObjectType):
class Meta:
model = Users
fields = '__all__'
class Users_mutation(graphene.Mutation):
class Arguments:
name = graphene.String()
password = graphene.String()
image = Upload()
users = graphene.Field(Users_Type)
def mutate(cls,info,name,image,password):
user = Users(username=name,password=password,user_profile=image)
user.save()
return Users_mutation(users=user)
Under main mutation class
create_user = Users_mutation.Field()
my main goal is to upload files and images , pls tell me how to do it and neccassary string that need to be put in mutation... Help would be appreciated