Strange behavior in validations API

Hey folks,

I have a question about ValidationCreateInput:

In the 2025-07 API version, there was a functionId attribute that got deprecated in favor of functionHandle (added in 2025-10). That makes sense, but here’s the issue: despite functionId appearing in the docs, I don’t see it in the actual GraphQL API schema. Usually deprecated attributes remain available in the schema, but that’s not happening here.

See the screen from GraphiQL documentation:

As you can see: functionId is gone! And the strangest thing is that despite it being gone, calling validationCreate with the functionId in 2025-10 actually succeeds without any errors:

Also, on a side note: it looks like functionHandle wasn’t added to the validations query. The Validation object returns shopifyFunction, which still has id (deprecated earlier) but no handle:

Could someone shed some light on what is going on here?

Thanks a lot!

1 Like

Hey Patrick,

It looks like there might be a visual error with CLI’s GraphiQL surface.
In the GraphiQL app, it’s included in a dropdown like this:
04-02-c9qog-hwkkp
I don’t believe it’s intended that functionHandle isn’t included in a number of Function objects.

Thanks for flagging these! I’ll get these addressed :slight_smile:

Hi @Paige-Shopify thanks for quick answer and looking into it!

I don’t have that “Show deprecated fields” button in GraphiQL. I think it’s more then that.

I also don’t see it when running GraphQL IntrospectionQuery, try it yourself by running:

curl 'https://shopify.dev/admin-graphql-direct-proxy/2025-10' \
  -X POST \
  -H 'accept: application/graphql-response+json, application/json, multipart/mixed' \
  -H 'content-type: application/json' \
  --data-raw '{"query":"query IntrospectionQuery{__schema{queryType{name kind}mutationType{name kind}subscriptionType{name kind}types{...FullType}directives{name description locations args{...InputValue}}}}fragment FullType on __Type{kind name description fields(includeDeprecated:true){name description args{...InputValue}type{...TypeRef}isDeprecated deprecationReason}inputFields{...InputValue}interfaces{...TypeRef}enumValues(includeDeprecated:true){name description isDeprecated deprecationReason}possibleTypes{...TypeRef}}fragment InputValue on __InputValue{name description type{...TypeRef}defaultValue}fragment TypeRef on __Type{kind name ofType{kind name ofType{kind name ofType{kind name ofType{kind name ofType{kind name ofType{kind name ofType{kind name ofType{kind name ofType{kind name}}}}}}}}}}"}' \
  | jq '.data.__schema.types[] | select(.name == "ValidationCreateInput")'

Here’s what I get back:

{
  "kind": "INPUT_OBJECT",
  "name": "ValidationCreateInput",
  "description": "The input fields required to install a validation.",
  "fields": null,
  "inputFields": [
    {
      "name": "functionHandle",
      "description": "The function handle representing the extension to install.",
      "type": {
        "kind": "SCALAR",
        "name": "String",
        "ofType": null
      },
      "defaultValue": null
    },
    {
      "name": "enable",
      "description": "Whether the validation should be live on the merchant checkout.",
      "type": {
        "kind": "SCALAR",
        "name": "Boolean",
        "ofType": null
      },
      "defaultValue": "false"
    },
    {
      "name": "blockOnFailure",
      "description": "Whether the validation should block on failures other than expected violations.",
      "type": {
        "kind": "SCALAR",
        "name": "Boolean",
        "ofType": null
      },
      "defaultValue": "false"
    },
    {
      "name": "metafields",
      "description": "Additional metafields to associate to the validation.",
      "type": {
        "kind": "LIST",
        "name": null,
        "ofType": {
          "kind": "NON_NULL",
          "name": null,
          "ofType": {
            "kind": "INPUT_OBJECT",
            "name": "MetafieldInput",
            "ofType": null
          }
        }
      },
      "defaultValue": "[]"
    },
    {
      "name": "title",
      "description": "The title of the validation.",
      "type": {
        "kind": "SCALAR",
        "name": "String",
        "ofType": null
      },
      "defaultValue": null
    }
  ],
  "interfaces": null,
  "enumValues": null,
  "possibleTypes": null
}
1 Like

Oh, I see what you mean. Definitely more than a visual issue then.
Thanks for pointing that out to me. Looks like we need to get the schema updated.

Learnt something today, turns out the GraphQL Admin API defaults the includeDeprecated argument to false. This means if we want the query to return deprecated fields, we need to include inputFields(includeDeprecated: true).

This returns the correct schema:

curl 'https://shopify.dev/admin-graphql-direct-proxy/2025-10' \
  -X POST \
  -H 'accept: application/graphql-response+json, application/json, multipart/mixed' \
  -H 'content-type: application/json' \
  --data-raw '{"query":"query IntrospectionQuery{__schema{queryType{name kind}mutationType{name kind}subscriptionType{name kind}types{...FullType}directives{name description locations args{...InputValue}}}}fragment FullType on __Type{kind name description fields(includeDeprecated:true){name description args{...InputValue}type{...TypeRef}isDeprecated deprecationReason}inputFields(includeDeprecated:true){...InputValue}interfaces{...TypeRef}enumValues(includeDeprecated:true){name description isDeprecated deprecationReason}possibleTypes{...TypeRef}}fragment InputValue on __InputValue{name description type{...TypeRef}defaultValue isDeprecated deprecationReason}fragment TypeRef on __Type{kind name ofType{kind name ofType{kind name ofType{kind name ofType{kind name ofType{kind name ofType{kind name ofType{kind name ofType{kind name ofType{kind name}}}}}}}}}}"}' \
  | jq '.data.__schema.types[] | select(.name == "ValidationCreateInput")'

Shows how often I run introspection queries haha

Looks like the CLI’s GraphQL interface needs to take a similar approach and ask for those deprecated fields. We’re getting on to that now.

Regarding your side note about functionHandle not being included in validations query (and other Function objects), we’ll be adding it in API version 2026-01 :slight_smile: