Hey Kyle,
Thanks for your response.
I followed your suggestion to limit the definitions to 50, but encountered the same error. (Even when I changed it to just one definition, it still didn’t work.)
{
networkStatusCode: 200,
message: "GraphQL Client: An error occurred while fetching from the API. Review 'graphQLErrors' for details.",
graphQLErrors: [
{
message: 'Internal error. Looks like something went wrong on our end.\n' +
'Request ID: 72db11e1-f43e-4a98-a5a1-3057f1a7becc-1712618678 (include this in support requests).',
extensions: [Object]
}
]
}
{
networkStatusCode: 200,
message: "GraphQL Client: An error occurred while fetching from the API. Review 'graphQLErrors' for details.",
graphQLErrors: [
{
message: 'Internal error. Looks like something went wrong on our end.\n' +
'Request ID: 07a7ac79-f629-4643-8a6c-5776e8063a86-1712618679 (include this in support requests).',
extensions: [Object]
}
]
}
{
networkStatusCode: 200,
message: "GraphQL Client: An error occurred while fetching from the API. Review 'graphQLErrors' for details.",
graphQLErrors: [
{
message: 'Internal error. Looks like something went wrong on our end.\n' +
'Request ID: ac77945c-007b-40a7-a77d-9895f540b5c7-1712618679 (include this in support requests).',
extensions: [Object]
}
]
}
Here is the script to get metafields
mport {handleOperation} from "./index.js";
const ownerTypes = ["PRODUCT", "PRODUCTVARIANT", "COLLECTION"];
const returnOperation = (type) =>
`query {
metafieldDefinitions(first: 50, ownerType: ${type}) {
edges {
node {
name
namespace
key
description
type {
category
name
supportsDefinitionMigrations
supportedValidations {
name
type
}
}
ownerType
}
}
}
}`;
for (const type of ownerTypes) {
await handleOperation({operation: returnOperation(type), type});
}
We’ve got similar script for getting metaobject, which works for us.
import {handleOperation} from "./index.js";
const operation = `
query {
metaobjectDefinitions(first: 250) {
edges {
node {
id
name
type
description
fieldDefinitions {
key
name
description
type {
category
name
}
validations {
name
type
value
}
}
}
}
}
}`;
handleOperation({operation, type: "metaobject"});