Schema-first uses typePaths to point at .graphql SDL files and a definitions config to generate TypeScript interfaces from them. Resolvers reference the generated types. Choose schema-first when the SDL is the team's API contract or when frontend developers write the schema and backend implements against it.
Choose schema-first when the SDL is the team's shared API contract (API-design-first workflow).
Choose schema-first when frontend developers write the schema and backend implements against it.
Choose code-first when TypeScript is the single source of truth and you want full IDE support.
Schema-first risk: interface drift — SDL and generated TypeScript can diverge if code generation is skipped.
Code generation must be re-run whenever the SDL changes — automate this in CI.