stephenbaidu / mojofz-app

0 stars 0 forks source link

[Question] Dynamic Shopify API Client #1

Open fabiensebban opened 5 years ago

fabiensebban commented 5 years ago

Hello,

I found your project looking for a way to set dynamically the Shopify client before request the Shopify GraphQL API. I saw that you init the Shopify client in the shopify init file.

How would you do to init a dynamic Shopify Client depending on the Shopify private app my app wants to query?

In my case, I need to sync multiple store information. To do this, I want to get information from a store and sent it to another store in the same execution.

stephenbaidu commented 5 years ago

@fabiensebban I don't think it is supported. You might have to do this via partner accounts. You probably found this link already but do check it out. And by the way, I'm still new to their API and this repo was for an interview task 😄

fabiensebban commented 5 years ago

@stephenbaidu , thank you for your answer! I found this to dynamically set the query constant :

https://stackoverflow.com/questions/50382830/graphqlclientdynamicqueryerror-expected-definition-to-be-assigned-to-a-stati/51681530?stw=2#51681530

It looks a little bit dirty but it works. Do you think it can affect my server performance to use the ruby Kernel function?