d @pnp/graph in SPFx<a class="headerlink" href="#using-both-pnpsp-and-pnpgraph-in-spfx" title="Permanent link">&para;</a></h3>
<pre><code class="language-TypeScript">
import { spfi, SPFx as spSPFx } from &quot;@pnp/sp&quot;;
import { graphfi, SPFx as graphSPFx} from &quot;@pnp/graph&quot;;

// ...

protected async onInit(): Promise&lt;void&gt; {

    await super.onInit();
    const sp = spfi().using(spSPFx(this.context));
    const graph = graphfi().using(graphSPFx(this.context));

}

// ...

</code></pre>
