How are people using this

HunkyBill
Shopify Expert
4476 45 484

Shopify App rake task:

rails shopify_api:graphql:dump

 

So with an oAuth token, this will dump the GraphQL schema. How are people using this exactly in their Rails projects? I was just dumping the Scheme using graphql-client gem and then loading it once statically in the gem so that I was not blowing up memory. I am curious as to how others are taking advantage of this rake task to dump the scheme and then use it in Ruby to make Query calls and Mutations.

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
robin_sandhu
Tourist
8 0 0

hello sir, If you got the solution can you please post it here.So that future visitors will take help from you.

0 Likes
HunkyBill
Shopify Expert
4476 45 484

It is nothing more than a convenience for development mode. Shopify has jigged the Shopify App gem to look for the schema when running in development, to help with errors and the like. There is no need for the schema in production because hopefully, your setup and calls are already tested and working.

One note, there seems to be a quirk where even in production, it seems on first boot and loading of a Rails App with the Shopify App gem, there is a delay and it seems to stem from the App loading this schema, even though it is NOT needed. So this is probably a bug.

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
0 Likes