How to check product ownership?

As part of the new productCreate mutation, one of the inputs to the ProductCreateInput object is a claimOwnership field. I am claiming ownership by setting the bundles input to true, but how can I confirm that this field was set correctly? I browsed through various product related queries, tried a few GQL queries, but came up empty.

From this post in the old forum, it appears the claimOwnership field is required for the new product.configuration admin UI extension to work properly. So other than checking if the extension appears in a product page, how can one confirm claimOwnership is set correctly for all or specific products?

Hey!!

So, if you’re trying to confirm that the claimOwnership field is set correctly for a product after using the new productCreate mutation, may be try following the below steps it might solve your issue:

1. Check the Response of the Mutation:

When you create a product using the productCreate mutation, ensure that the response contains the field indicating ownership is claimed. You should receive the claimOwnership field as part of the response. If the claimOwnership was set correctly, it should appear with the value you provided (e.g., true).

Example:

mutation {
  productCreate(input: { title: "New Product", claimOwnership: true, ... }) {
    product {
      id
      title
      claimOwnership
    }
  }
}

If claimOwnership is set correctly, the response will show:

{
  "product": {
    "id": "gid://shopify/Product/1234567890",
    "title": "New Product",
    "claimOwnership": true
  }
}

2. Check Product Details via GraphQL Query:

After the product is created, you can use a GraphQL query to fetch the product details and check if the claimOwnership field is correctly set.

Example query:

query {
  product(id: "gid://shopify/Product/1234567890") {
    id
    title
    claimOwnership
  }
}

If claimOwnership is properly set, it will return true in the response for that product.

3. Check in the Admin UI:

As mentioned, the claimOwnership field is important for enabling the new product.configuration admin UI extension. You can confirm that this extension works properly by navigating to the product page in Shopify Admin and ensuring the extension appears. If the extension is available, it’s a strong indication that ownership was claimed successfully.

If you still have trouble confirming the field, I would suggest you to contact Shopify support or a Shopify developer might be necessary to ensure the mutation is working as intended.

@shinedezigninfo Thanks for the detailed reply.

However, there is no claimOwnership field in the product query or product object.

Please double-check your sources and confirm the validity of your proposed suggestions before posting.

Hi Steve,

Asking the product team about this now - this is relatively new, so we may need to add a field to the product object so product ownership can be checked.

Hey Steve,

Our team have confirmed this is a gap in the API and developers should be able to query the product direct to pull ownership. This will be added to the roadmap to support but there’s no ETA I can share on when this will be available.

Thanks for flagging this.