Not able to send enum as payload using @Shopify_77 /api , graphQL for node - lastest version.
The query works in GrapiQL interface as the entire payload is text.
`query FetchMetafields {
metafieldDefinitions(ownerType: PRODUCT, namespace: "test_namespace", first: 10) {
nodes {
namespace
key
id
ownerType
}
}
}`
the ownerType is an enum - MetafieldOwnerType https://shopify.dev/docs/api/admin-graphql/2023-04/enums/MetafieldOwnerType#top. When passed as “PRODUCT” in the app, the query returns an error.
response: {
2023-06-11 03:04:58 | backend | errors: [
2023-06-11 03:04:58 | backend | {
2023-06-11 03:04:58 | backend | message: 'Parse error on "ownerType" (IDENTIFIER) at [2, 24]',
2023-06-11 03:04:58 | backend | locations: [ { line: 2, column: 24 } ]
2023-06-11 03:04:58 | backend | }
2023-06-11 03:04:58 | backend | ]
2023-06-11 03:04:58 | backend | }
Are the enums available for shopify-app node SDK or should i pass a different string?