title: How to test a graphql upload mutation with additional parameters in laravel lighthouse
body: <p>As the title states, I want to be able to test the upload of a file using the available scalar while also providing additional parameters to the same mutation. The documentation provides a helper on how to test this <a href="https://lighthouse-php.com/4.16/testing/phpunit.html#simulating-file-uploads" rel="nofollow noreferrer">Lighthouse docs simulating file uploads</a>. But my mutation also needs some additional dynamic parameters for the test. But I can't figure out how to provide these additional parameters. An example of my current setup:</p>
  <pre><code>$response = $this-&gt;multipartGraphQL(['operations' =&gt; {
     &quot;query&quot;: &quot;mutation ($file: Upload!) {registerUser(email: $email, files: [$file]) {courseRegistrationFiles{id}}}&quot;,
     &quot;variables&quot;: {&quot;file&quot;: null}
  }', 'map' =&gt; '{&quot;0&quot;: [&quot;variables.file&quot;]}'], [
     '0' =&gt; UploadedFile::fake()-&gt;create('document.pdf', 100)
  ]);
  </code></pre>
  <p>A few additional notes the $email should be represented using a faked email address, this is done in the line above this snippet. At first, I imagined that I had to provide the email variable within the same brackets as where I define the uploadeFile::fake() but this lead to the error that stated that parameters within this portion of the method should be of the type <code>UploaedFile</code>. After that I've also tried simply adding them to the map/variables portions but this lead to the param being null.</p>