Running into major Codgen error in the Admin API: DeliverySettingInput

Hey there! I am running into a major issue when using Codegen with the Shopify Admin API. This seems to be a new error and potentially a bug in the API schema on the Shopify end of things..

I am getting this error when running Codegen:

> graphql-codegen --config codegen.ts

[dotenv@17.2.2] injecting env (12) from .env -- tip: ⚙️  suppress all logs with { quiet: true }
✔ Parse Configuration
⚠ Generate outputs
  ❯ Generate to ./types/shopify-admin.d.ts
    ✔ Load GraphQL schemas
    ✔ Load GraphQL documents
    ✖ Input Object type DeliverySettingInput must define one or more fields.
  ✔ Generate to ./types/shopify-storefront.d.ts
  ✖ One or more errors occurred, no files were generated. To allow output on errors, set config.allowPartialOutputs=true
 ELIFECYCLE  Command failed with exit code 1.

The issue lies in this field DeliverySettingInput. However, I never even use this field anywhere in my GraphQL at all:

import { gql } from 'graphql-tag'

export const CUSTOMER_UPDATE_METAFIELDS = gql`
  mutation customerUpdate(
    $input: CustomerInput!
  ) {
    customerUpdate(input: $input) {
      customer {
        id
        metafields(first: 10) {
          edges {
            node {
              id
              key
              namespace
              value
            }
          }
        }
      }
      userErrors {
        message
        field
      }
    }
  }
`

My Codegen config and Admin API GraphQL schemas have not changed all year and this is the first time I’m seeing this issue. Any information would be great!

1 Like

Happening to my team as well since this morning. Any fix for it?

Funny to see you here @rylanharper! :smiley: Just came in to say, Nuxt Shopify is experiencing the same problem: Input Object type DeliverySettingInput must define one or more fields.

Then, no introspection loading anymore at all. No code changes, it just suddenly started failing

Also facing the same issue since yesterday. Any update on the fix?

I have been able to solve this by manually adding the missing type like this:

export default {
  // For syntax highlighting / auto-complete when writing operations
  schema: 'https://shopify.dev/admin-graphql-direct-proxy/2025-07',
  documents: ['./**/*.{js,ts,jsx,tsx}'],
  projects: {
    default: {
      schema: [ // <-- here, an array instead of a string, second item is the missing input
        'https://shopify.dev/admin-graphql-direct-proxy/2025-07',
        `
          input DeliverySettingInput {
            clientMutationId: String
          }
        `,
      ],
// [...] rest of the config
}
1 Like

Hi there.

I’m really sorry about this.

The good news is we are aware of the problem and we’re shipping a fix ASAP. It should be resolved in a few hours if everything goes smoothly.

Thank you @Mateusz_Gachowski for that workaround!

Another option to is to convince graphql-js to skip validation. Something like:

  const defaultProject = shopifyApiProject({
    apiType: ApiType.Admin,
    apiVersion: ApiVersion.Unstable,
    documents: [
      './app/services/shop/graphql/**/*.{ts,tsx}',
      './app/graphql/*.ts',
    ],
    outputDir: './app/types/graphql',
  });

  // Remove the schema.json generation for now as it's causing issues with empty input types
  delete defaultProject!.extensions!.codegen.generates[
    './app/types/graphql/admin-unstable.schema.json'
  ];

  // Don't validate the document due to empty object issue
  defaultProject!.extensions!.codegen.generates[
    './app/types/graphql/admin.types.d.ts'
  ].config = {
    ...defaultProject!.extensions!.codegen.generates[
      './app/types/graphql/admin.types.d.ts'
    ].config,
    skipDocumentsValidation: true,
  };

Apologies again for breaking your workflows.

1 Like

The fix has been deployed now. You should find that introspection is now working properly without any of the workarounds. I’m sorry for all the trouble we caused here.

2 Likes