Hi, I used to be able to retrieve shopify forms metaobject definitions via the api. But recently, my api calls do not return shopify forms. I have not changed the code so I am bit confused as to why this is happening. This is my code snippet below;
url = "https://example.myshopify.com/admin/api/2025-01/graphql.json"
headers = {
"Content-Type" => "application/json",
"X-Shopify-Access-Token" => "example"
}
query = {
query: <<-GRAPHQL
{
metaobjectDefinitions(first: 50) {
edges {
node {
type
name
fieldDefinitions {
name
key
type {
name
}
}
}
}
}
}
GRAPHQL
}
response = HTTParty.post(url, headers: headers, body: query.to_json)
parsed = JSON.parse(response.body)
puts JSON.pretty_generate(parsed)
shopify_forms = parsed["data"]["metaobjectDefinitions"]["edges"].select do |edge|
edge["node"]["type"].include?("shopify-forms")
end
Like I mentioned above, this code used to work fine in retrieving Shopify forms on a store. Is there any reason why this is not working at the moment ?
Hi @Liam-Shopify , it does not work even in the GraphiQL interface. I have to note that, it returns other type of Metaobject Definitions but does not return Shopify forms.
This same query used to return Shopify forms Metaobject Definitions. So it is obvious something changed recently. I have customers who rely on this, so I am desperate to find a solution
From digging into this further it appears that app-owned metaobjects (like the Shopify Forms ones) were never meant to be readable. The earlier access was unintended, unfortunately the undocumented operation you were relying on previously isn’t supported anymore.
Hi @Liam-Shopify, in that case what are my options for retrieving a Shopify form. My app has a workflow that relies on Shopify forms and I have merchants using this worklflow. Are there any api’s or workarounds I can use ?
I could probably make do with retrieving Shopify form submissions. Any idea if that is possible ?