I have already implemented the feature to add free shipping code by subscriptionDraftDiscountCodeApply and subscriptionDraftCommit. and I can make sure the subscription contract has free shipping if the subscription purchase completed and got mail. (the mail mention the purchase has free shipping)
but I can't make sure the subscription contract has free shipping before the purchase is not completed even I use the Querying discount allocations.
it it is "percentage discount" or "fixed amount discount", it is listed in "data.subscriptionDraft.lines.edges.node.discountAllocations". but if it is free shipping discount, it is not listed on the place.