I need to provide a graph client for Storefront API but I can only build the client after making a network call.
@Provides
@Singleton
fun getGraphClient(context: Context, client: Client): GraphClient {
return GraphClient.build(
context = context,
shopDomain = client.shopifyDomain,
accessToken = client.storefrontAccessToken
)
}
How can I after making a network call to get the client pass it to hilt to return the graph client?