Designs GraphQL schemas with proper types, resolvers, N+1 prevention, and federation.
Click to play with sound.
---
name: GraphQL Schema
description: Design GraphQL schemas and resolvers that scale.
---
# GraphQL Schema
Design a schema clients love and a server that doesn't fall over.
## Schema design
1. Model the graph around domain nouns, not your database tables.
2. Use the schema-first SDL as the contract; generate types from it.
3. Prefer non-null (`!`) by default; make a field nullable only when null is a real, meaningful value.
4. Return rich object types, not scalars, so the schema can evolve.
```graphql
type Query {
order(id: ID!): Order
}
type Order {
id: ID!
status: OrderStatus!
items: [LineItem!]!
customer: Customer!… install to load the full skillSign in to rate and review this skill.
No reviews yet. Be the first to review this skill.