Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Metafield User Error

Solved

Metafield User Error

h3x
Visitor
2 0 1

Hi, I was able to create meta fields. But suddenly, my code stopped working. I have checked the result, and there was an internal server error. So I thought that it might be a syntax error on my query, and I copied the question from docs which you can see below. And now I get this error. Is it possible for something to change on the stable API version when it is live? Because I did not change any part of this code, it just stopped working. Also, I could not find any information about "forceCreate" parameter.

 

My query:

 

mutation metafieldDefinitionCreate($definition: MetafieldDefinitionInput!) {
              metafieldDefinitionCreate(definition: $definition) {
                createdDefinition {
                  id
                }
                userErrors {
                  field
                  message
                }
              }
            }

 

 

Result:

 

{
    'data': {
        'metafieldDefinitionCreate': {
            'createdDefinition': None,
            'userErrors': [{
                'field': ['definition', 'forceCreate'],
                'message': 'Force create may not be empty'
            }]
        }
    },
    'extensions': {
        'cost': {
            'requestedQueryCost': 10,
            'actualQueryCost': 10,
            'throttleStatus': {
                'maximumAvailable': 1000.0,
                'currentlyAvailable': 990,
                'restoreRate': 50.0
            }
        }
    }
}

 

 

Accepted Solution (1)

Jesse_Vogt
Shopify Staff
14 2 10

This is an accepted solution.

The issue with metafieldDefinitionCreate should now be resolved.

To learn more visit the Shopify Help Center or the Community Blog.

View solution in original post

Replies 9 (9)

EliasKotlyar
Visitor
1 0 0

Can confirm that this api is not working anymore. I returned back to example code which is explained at https://shopify.dev/apps/metafields/definitions, but no effect.

 

Some IDs from my instance for verifiying:

Internal error. Looks like something went wrong on our end.
Request ID: 95f94c9e-9093-4f40-bbe1-e1172469103e (include this in support requests)., extensions - code - INTERNAL_SERVER_ERROR, requestId - 95f94c9e-9093-4f40-bbe1-e1172469103e

Jesse-James
Shopify Partner
22 0 9

This is happening to me too - or it returns a errors.0.message "Internal error. Looks like something went wrong on our end. \nRequest ID: xxxxx (include this in support requests)

 

Anyone from Shopify API team know whats going on???

Mercantile Apps - simple apps for enterprise growth
Learn more

abater
Shopify Partner
8 0 2

I'm experiencing the same problem. Could anyone from the Shopify team shed any light on this?

alexander777
Visitor
1 0 0

Same error

Jesse_Vogt
Shopify Staff
14 2 10

Hi all,

 

Jesse from the Metafields team here. Thanks for bringing this to our attention. This was an error on our side and the fix will be shipping today. I will follow up here when it is live.

 

 

To learn more visit the Shopify Help Center or the Community Blog.

Jesse_Vogt
Shopify Staff
14 2 10

This is an accepted solution.

The issue with metafieldDefinitionCreate should now be resolved.

To learn more visit the Shopify Help Center or the Community Blog.

h3x
Visitor
2 0 1

I have tested it, and it works now. Thank you.

danzig
Visitor
1 0 0

Hey, 
I have the same issue with the the deliveryProfileCreate mutation is used to include free shipping for all countries in the selling plan group.
this is the json response i am getting : 

 

{
    "data": {
        "deliveryProfileCreate": {
            "profile": null
        }
    },
    "extensions": {
        "cost": {
            "requestedQueryCost": 21,
            "actualQueryCost": 10,
            "throttleStatus": {
                "maximumAvailable": 1000.0,
                "currentlyAvailable": 990,
                "restoreRate": 50.0
            }
        }
    }
}

 

can you help me sort it out?

sratna
Shopify Partner
3 0 1

Hi,

 

I am facing the same issue but I have following error message:

 

"message": "Variable $definition of type MetafieldDefinitionInput! was provided invalid value for forceCreate (Field is not defined on MetafieldDefinitionInput)"

 

Can you please help me with it?