Skip to content

Files

Latest commit

 

History

History
29 lines (22 loc) · 515 Bytes

no-deprecated-fields.md

File metadata and controls

29 lines (22 loc) · 515 Bytes

Pattern: Deprecated field as part of the query

Issue: -

Description

Validates that no deprecated fields are part of the query. This is useful to discover fields that have been marked as deprecated and shouldn't be used.

Examples

Fail

// 'id' requested and marked as deprecated in the schema

schema {
  query {
    viewer {
      id: Int @deprecated(reason: "Use the 'uuid' field instead")
      uuid: String
    }
  }
}

query ViewerName {
  viewer {
    id
  }
}