wispbit logo
wispbit
Early Access
  • Rules
    new!
  • Blog
  • Pricing
Categories
  • postgresql
    15
  • migrations
    15
  • drizzle
    9
  • sqlalchemy
    6
  • alembic
    6
  • nextjs
    5
  • typescript
    5
  • mysql
    4
  • python
    4
  • react
    3
  • css
    1
  • graphql
    1
  • vue
    1
  • javascript
    1

graphql Rules

1 rule found for graphql

Mark fields as deprecated in GraphQL

When removing fields from a GraphQL schema, follow a progressive deprecation process: 1. First, mark the field to be removed as deprecated using the @deprecated directive 2. Introduce the new alternative field in the same operation 3. Only remove deprecated fields after they have been deprecated for a sufficient time period Bad: `graphql // Before type User { id: ID! oldEmail: String! } // After (directly removing the field) type User { id: ID! } ` Good: `graphql // Step 1: Mark as deprecated and introduce alternative type User { id: ID! oldEmail: String! @deprecated(reason: "Use 'email' field instead") email: String! } // Step 2: Only later, remove the deprecated field type User { id: ID! email: String! } `

graphql

wispbit
Privacy policyTerms of serviceBook a demo