Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OrderLineItem.id Unavailable #831

Closed
cocoahero opened this issue Apr 3, 2018 · 9 comments
Closed

OrderLineItem.id Unavailable #831

cocoahero opened this issue Apr 3, 2018 · 9 comments

Comments

@cocoahero
Copy link
Contributor

It appears that the Storefront API / GraphQL schema does not include the IDs for an Order's line items. This is a disparity from the Admin JSON API.

@dbart01
Copy link
Contributor

dbart01 commented Apr 10, 2018

Thanks for bringing this. We're looking into it.

@rebeccajfriedman
Copy link
Contributor

@cocoahero Is there a use case where you need this information exposed?

@cocoahero
Copy link
Contributor Author

@rebeccajfriedman we have information attached to the Order object within metafields that are keyed by the line item IDs.

@phdemontigny
Copy link

@cocoahero Following up on this ticket, ids for order line items are available through the admin API along with metafield data. Is there a use case for you where it would be preferable to have the ids available through the storefront API?

@cocoahero
Copy link
Contributor Author

It is already unreasonable to ask us to make two network requests to fetch the Order from the Storefront SDK, and one to fetch the metafields via a proxy API service that we had to build to prevent embedding admin API tokens in the app. You're now asking us to make a third?

@eapache
Copy link

eapache commented Jul 16, 2018

I'm curious what you're trying to accomplish with this app? As you might have noticed by the need to set up your proxy, metafields weren't originally intended to work with the storefront API. I'm wondering if there's a better solution here that would simplify the whole flow?

@cocoahero
Copy link
Contributor Author

I'm curious what you're trying to accomplish with this app?

A native app version of our web storefront. That's what this SDK was originally designed for, correct? The fact that this SDK has transitioned to utilizing the same storefront APIs designed for simple product marketplace services like Pinterest and Facebook has become its biggest weakness. Many desirable features (such as metafield access, checkout scripts, and product inventory levels) have become intentionally out of scope.

Due to various limitations or lack of features in the Shopify platform, we've had to resort to building custom private embedded apps that read and write metafields to attach information to things like products, collections, and orders. We use those metafields to then implement features on our online store. It is obviously desired to have those same features available within our native app. Thus our need to access metafield information via a proxy service.

An example of said features include product collection filter UIs, structured product descriptions beyond a singular block of HTML, displaying product videos, etc.

I'm wondering if there's a better solution here that would simplify the whole flow?

To be frank, our internal discussions of a better solution and our frequent frustrations with the direction of the Shopify platform (in particular its disregard to native mobile apps) has led us to think about migrating off of Shopify for something better. It is unfortunate that we're having to hold back powerful user facing features on our web storefront simply because limitations in this SDK prevent native app parity.

@eapache
Copy link

eapache commented Jul 16, 2018

Many desirable features (such as metafield access, checkout scripts, and product inventory levels) have become intentionally out of scope.

Inventory levels are intentionally out of scope as discussed in the ticket you linked since the Storefront API is unauthenticated. Metafield access is potentially in scope, but requires a great deal of internal work first in order to deal with the permissions and security issues described here. Checkout scripts are definitely in scope, they just haven't been implemented yet.

It is obviously desired to have those same features available within our native app. Thus our need to access metafield information via a proxy service.

Right, this makes total sense and I'll see if I can bump up the priority of fixing metafields properly internally.

@tristan-potter
Copy link
Contributor

@cocoahero I believe this information is now available in the SDK 🎉 (Order id's and product metafields), so I'm going to close this. Let us know if you need anything else!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants