wispbit logo
wispbit
  • Rules
  • Blog
  • Pricing
Categories
  • typescript
    26
  • postgresql
    22
  • migrations
    22
  • prisma
    14
  • python
    13
  • supabase
    13
  • drizzle
    13
  • react
    10
  • nextjs
    9
  • sqlalchemy
    8
  • alembic
    8
  • golang
    7
  • mysql
    4
  • ruby
    3
  • rails
    3
  • rust
    3
  • markdown
    2
  • php
    2
  • javascript
    2
  • vue
    2
  • css
    1
  • expressjs
    1
  • flask
    1
  • quart
    1
  • graphql
    1
  • shell
    1
  • tailwind
    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

Code review that fixes tribal knowledge

Book a demoPrivacy policyTerms of service