Lessons Learned Migrating APIs to GraphQL 📝

This post shows best practices 💫 of migrating APIs to GraphQL. Add your thoughts, collabore asking/resolving concerns 🤗, show them your folks, but 🙏🏻, share knowledge 💜

Lessons Learned

Modularize 👌 your typeDefs & resolvers 👇

“Break your schema by concern, not by types“ — Martijn Walraven 👇

DRY ♻️, use context! 👇

Evaluate whether your schema is feature or domain based 👇

Show what’s important 👀 first 👇

Decouple global typeDefs! 👇

Take advantage 🚀 of ESNext 👇

Return several types using Union Types!👇

Use Aliases 🔥 to rename the result of a field 👇

Don’t over-engineer, you can query with fetch👇

DRY ♻️, use fragments!

Get rid off your variables using Input Types 👇

Extra 🌟

Don’t miss the 1st part of a series resuming PayPal’s best practices for building GraphQL APIs 👇

Recapping

👉 Modularize 👌 your typeDefs & resolvers
👉 “Break your schema by concern, not by types“ — Martijn Walraven
👉 DRY ♻️, use context!
👉 Evaluate whether your schema is feature or domain based
👉 Show what’s important 👀 first
👉 Decouple global typeDefs!
👉 Take advantage 🚀 of ESNext
👉
Return several types using Union Types!
👉 Use Aliases 🔥 to rename the result of a field
👉 Don’t over-engineer, you can query with fetch
👉 DRY ♻️, use fragments!
👉 Get rid off your variables using Input Types

⭐️
GraphQL Resolvers: Best Practices

Already waiting to add yours 🤗, contribute adding more lessons learned 👇

Or even better…

Create posts 😀, courses 😄, meetups 😍, anything!, just be 🤗 and curious for teaching & learning 🚀

I’ll be following this post up 🔜 with more lessons learned, stay tuned!

Please, consider🙏🏻ing, contribut♻️ing and shar💜ing it!