You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a problem testing an application with Starlette's test client.
I'm using Ariadne for GraphQL support and I have a resolver that takes two arguments: image and id. Image is an Ariadne Upload type, which in turn is an instance of Starlette's UploadFile.
I'm trying to test that the upload resolver works using the client, but I can't get the image variables to map with the files I'm sending.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a problem testing an application with Starlette's test client.
I'm using Ariadne for GraphQL support and I have a resolver that takes two arguments:
image
andid
. Image is an Ariadne Upload type, which in turn is an instance of Starlette's UploadFile.I'm trying to test that the upload resolver works using the client, but I can't get the image variables to map with the files I'm sending.
Here's the test I currently have
But I'm getting
Variable '$image' of non-null type 'Upload!' must not be null.
Is there a way to use test client to correctly map the files to the resolver variables ?
Beta Was this translation helpful? Give feedback.
All reactions