I'm using Graphene package in my Flask app (https://github.com/graphql-python/graphene) and graphene-file-upload (https://pypi.org/project/graphene-file-upload/). I need to receive a file through a mutation as bellow:
class Picture(graphene.Mutation):
class Arguments:
file = Upload(required=True)
numerical_id = graphene.Int()
def mutate(self, info, file):
... continues
class Mutations(graphene.ObjectType):
picture = Picture.Field()
But when I send the mutation via an Apollo client (https://www.apollographql.com/docs/react/) I'm receving this errors:
Unknown type "Upload". Perhaps you meant "Float"?
Cannot query field "picture" on type "Mutations".
Is there any workaround for it? Thank you in advance !