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

New product model - deprecated REST endpoints #1008

Open
tig66208 opened this issue Feb 1, 2024 · 8 comments
Open

New product model - deprecated REST endpoints #1008

tig66208 opened this issue Feb 1, 2024 · 8 comments
Labels
deprecated class or method Deals with a class or method in ShopifySharp that is, should, or will be deprecated. documentation upstream An issue with Shopify's implementation and not necessarily this package.

Comments

@tig66208
Copy link

tig66208 commented Feb 1, 2024

So...... what's the plan here, folks?

https://shopify.dev/docs/api/admin/migrate/new-product-model/api-updates

Looks like the REST API endpoints for products / variants is being deprecated with no replacement. This is.... less than awesome. I have enough new feature / mission critical things to be built, the last thing I need is having to do maintenance I wasn't planning, so .... thanks Shopify.

I know there has been some discussion about support of GraphQL, but this is going to force the matter some, don't we think?

Edit to add this fun nugget:
"Shopify’s API platform is GraphQL-first. Going forward, our approach to managing products programmatically will reflect that. We’ll be fully deprecating our product REST Admin API endpoints and continuing to build on the changes to the product model in the GraphQL Admin API only."

@clement911
Copy link
Collaborator

GraphQL has been supported for a while via the GraphService.

@tig66208
Copy link
Author

tig66208 commented Feb 1, 2024

Correct, you can execute a graph query but either I'm missing some documentation somewhere or there's not yet types for all of the graphql model?

@tig66208
Copy link
Author

tig66208 commented Feb 1, 2024

And if I am having a moment where I'm just totally missing a concept.... shame on me, and apologies.

My thoughts are, should there be a branch to replace the underlying implementation of the product service and product variant service for non-breaking changes to clients?

@clement911
Copy link
Collaborator

There types for all graph objects are actually already in the library, but we don't have enough docs about it.

This file shows a couple of example:
https://github.com/nozzlegear/ShopifySharp/blob/master/ShopifySharp.Tests/Graph_SendTests.cs

@nozzlegear
Copy link
Owner

@tig66208 We're starting a 7.0 release very soon, I just need to create all the tracking issues for the more pressing breaking changes that I want to include in the release.

I'll work on getting some thorough docs written up for using the graph service and the GraphQL types that we have built into ShopifySharp already. I agree they're not easy to discover since they're not documented anywhere. I'll change that this weekend, but the link that @clement911 sent to the tests should get you started.

We both use the GraphService in production and it works well, I have some QoL improvements planned for 7.0 as well.

@nozzlegear nozzlegear added documentation upstream An issue with Shopify's implementation and not necessarily this package. deprecated class or method Deals with a class or method in ShopifySharp that is, should, or will be deprecated. labels Feb 1, 2024
@tig66208
Copy link
Author

tig66208 commented Feb 1, 2024

Ah, yes.... ok I see it in the Entities/GraphQL/GraphQL.generated now.

So, just to confirm:

  • graphql queries we still need to pass as a string, we don't have a type system for building those
    -return types are pretty well covered

@clement911
Copy link
Collaborator

Yes, that is correct. Types are used for the return types.
Queries are built with plain strings.

@tig66208
Copy link
Author

tig66208 commented Feb 1, 2024

Thank you BOTH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecated class or method Deals with a class or method in ShopifySharp that is, should, or will be deprecated. documentation upstream An issue with Shopify's implementation and not necessarily this package.
Projects
None yet
Development

No branches or pull requests

3 participants