GraphQL Is a Trap?
Shopify&#x27;s API shows what the minimum ante is for a public-facing GraphQL API:<p>* Exotic rate limiting based on the quantity of data returned, not on the number of calls made over time. As a client, it is nearly impossible to throttle your code in any way other than &quot;try and maybe it fails sometimes&quot;.<p>* Tortured graph structure with edges&#x2F;node&#x2F;cursor levels in the tree. Navigation is a pain in the ass. See code sample below.<p>Furthermore, you <i>must</i> provide root query navigation for every object. Shopify doesn&#x27;t do this. So you end up with nearly impossible places to query to because you need to cursor into a parent to find a particular node, then cursor into its children to get to the right node. There&#x27;s no limit to the crazy. Building complex shipping profiles with Shopify&#x27;s API is a nightmare.<p>Here&#x27;s a real-world query I pulled out of my code:<p><pre><code>    query ($id: ID!, $zoneCursor: String) {
        deliveryProfile(id: $id) {
            id
            profileLocationGroups {
                locationGroupZones(first: 1, after: $zoneCursor) {
                    pageInfo {
                        hasNextPage
                    }
                    edges {
                        cursor
                        node {
                            zone {
                                id
                                name
                                countries {
                                    code {
                                        countryCode
                                    }
                                }
                            }
                            methodDefinitions(first: 150) {
                                pageInfo {
                                    hasNextPage
                                }
                                edges {
                                    node {
                                        id
                                        name
                                        active
                                        methodConditions {
                                            operator
                                            field
                                            conditionCriteria {
                                                ... on Weight {
                                                    unit
                                                    value
                                                }
                                                ... on MoneyV2 {
                                                    amount
                                                    currencyCode
                                                }
                                            }
                                        }
                                        rateProvider {
                                            ... on DeliveryRateDefinition {
                                                price {
                                                    amount
                                                    currencyCode
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
</code></pre>
I would much, <i>much</i> rather do this with a series of REST calls. Stripe&#x27;s API is much more pleasant.