title: How to call a graphql registered resolver from another one - Strapi
body: <p>I want to extend the graphql resolver of <code>removeFile</code> mutation (which comes from the <code>upload</code> core plugin).</p>
  <p>I have successfully <a href="https://docs.strapi.io/developer-docs/latest/update-migration-guides/migration-guides/v4/code/backend/graphql.html#replacing-resolvers" rel="nofollow noreferrer">replaced the resolver</a> using the following code on my plugin's <code>register.js</code> file, but I haven't yet find a way to call the original resolver of <code>removeFile</code> inside my custom one</p>
  <pre class="lang-js prettyprint-override"><code>export default ({ strapi }) =&gt; {
    const extensionService = strapi.plugin(&quot;graphql&quot;).service(&quot;extension&quot;);
  
    extensionService.use(({ nexus }) =&gt; ({
      resolvers: {
        Mutation: {
          removeFile: async (obj, args) =&gt; {
            // my custom logic will goes here
            
  
            // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
            // I WANT TO CALL the original resolver of &quot;removeFile&quot; here
            // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  
  
            // other logic will also goes here
          },
        },
      },
    }));
  };
  </code></pre>
  <p><strong>So my question is:</strong> How can I call a graphql registered resolver (the original resolver of <code>removeFile</code> mutation) from another one (the new registered resolver)?</p>
  <hr />
  <p>Additional Info: note that I have successfully replaced a controller handler by assign a new function to it and call the old one in some point of time. here is the code</p>
  <pre class="lang-js prettyprint-override"><code>export default ({ strapi }) =&gt; {
    strapi.container
      .get(&quot;controllers&quot;)
      .extend(&quot;plugin::upload.admin-file&quot;, (controller) =&gt; {
        const originalHandler = controller[&quot;destroy&quot;].bind(controller);
  
        controller[&quot;destroy&quot;] = async function (ctx) {
          // my custom logic will goes here
  
          await originalHandler();
  
          // other logic will also goes here
        };
  
        return controller;
      });
  };
  </code></pre>