Schema-first or code-first GraphQL

preview_player
Показать описание
Getting started with GraphQL doesn't always mean you need to write your schema by hand. Instead you can use code-first tools to define both your type definitions and resolvers.

#graphql #codefrist #schemafirst
Рекомендации по теме
Комментарии
Автор

I love code first approach. It gives you the greatest flexibility when coding and maintaining.

kasvith
Автор

Tried both schema (Apollo) and code first (Nexus) approach. I think the con in code first approach is that it doesn't out of the box support Apollo Federation. Looking at Nexus github issues, there is not even a reply whether they'd be supporting Federation.

Also, how do you declare directives and extend resolvers in a code first approach?

Maybe I need to look if Pothos is better than Nexus. Hmmmm.

arvi
Автор

Invariant Violation: Schema type definitions not allowed in queries -> on apollo/client

ABUTAHER-wggz