Homepage

DeprecatedGraphQLField

Last edit: Oct 26, 2026

DeprecatedGraphQLField

Severity: warning | Type: GraphQL

This check reports a .graphql file that uses a schema member marked @deprecated. A deprecated member still works — the query executes and returns data — so nothing else in the toolchain reports it, and the code keeps running until the member is removed.

The message is the schema's own @deprecated(reason:) text, so it names the replacement platformOS publishes rather than wording of its own. All four deprecation kinds are reported: fields, field arguments, enum values and input object fields.

The check requires an up-to-date local copy of the platformOS GraphQL schema. Run pos-cli check update-docs to download the latest schema.

No autofix or suggestion is offered. A successor named in a deprecation reason is rarely a drop-in rename — moving from models to records also changes argument names, the filter input type and the shape of the result — so a mechanical replacement would produce a query that no longer validates.

Examples

✗ Incorrect Code Example (Avoid using this):

query {
  models(per_page: 20, filter: { name: { value: "note" } }) {
    results {
      id
    }
  }
}

RootQuery.models is deprecated. The query runs and returns records, and the only signal is this check.

✓ Correct Code Example (Use this instead):

query {
  records(per_page: 20, filter: { table: { value: "note" } }) {
    results {
      id
    }
  }
}

Note that the replacement is not a rename: records takes table where models takes name.

Inline {% graphql %} blocks

This check is GraphQL-typed, so it only sees .graphql files. A query written inline in a Liquid template is covered by DeprecatedGraphQLFieldInline instead.

Configuration

The default configuration for this check:

DeprecatedGraphQLField:
  enabled: true
  severity: warning

Disabling This Check

This check is safe to disable while you are maintaining code against an older platform version, or during a migration where the deprecated form is still deliberate.

DeprecatedGraphQLField:
  enabled: false

Resources

Questions?

We are always happy to help with any questions you may have.

contact us