---
title: "Discussion on \"GraphQL for Beginners: Schema-first vs Code-first\" | Hashnode"
description: "Discussion on \"GraphQL for Beginners: Schema-first vs Code-first\". Let's take a look at the 2 ways we can build a GraphQL API. How they are different and their pros and cons."
url: "https://hashnode.com/posts/graphql-for-beginners-schema-first-vs-code-first/62a339c523f5f5accf275ed5"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [GraphQL for Beginners: Schema-first vs Code-first](https://blog.lo-victoria.com/graphql-for-beginners-schema-first-vs-code-first?utm_source=hashnode&utm_medium=feed)

Let's take a look at the 2 ways we can build a GraphQL API. How they are different and their pros and cons.

Jun 10, 2022 · 4 min read · blog.lo-victoria.com  
Updated Sep 2, 2022  
Read the article

-   [#graphql](https://hashnode.com/tag/graphql)
-   [#apis](https://hashnode.com/tag/apis)
-   [#beginner](https://hashnode.com/tag/beginner)

## Written by

[Victoria Lo](https://hashnode.com/@victoria)

@victoria · Singapore

  
[View profile](https://hashnode.com/@victoria)

A nerd in books, tea, games and software.

I'm a solutions engineer lead, GitHub Star, Director of WomenDevsSG, and co founder of ragTech. I work at the intersection of tech, systems, and leadership, and this blog is where I share my journey through all three. Expect honest reflections, real experiences, and thoughts that are still forming rather than polished career advice.

## Responses 4

Markdown supported · ⌘↵ to post

[Manuel Murphy](https://hashnode.com/@friendshipitem)

[Jul 3, 2024](https://hashnode.com/posts/graphql-for-beginners-schema-first-vs-code-first/62a339c523f5f5accf275ed5/comment/6684c22381dc80eec535db9b)

Great insights! [flappy bird](https://flappy-bird.co/)

[Nathan Froese](https://hashnode.com/@NoDiceNate)

[Jun 19, 2022](https://hashnode.com/posts/graphql-for-beginners-schema-first-vs-code-first/62a339c523f5f5accf275ed5/comment/62af85f7d8afe74aa51fde82)

Nice blog love the simplified explanation. Adding on to [Ophy Boamah](https://hashnode.com/@CodeHemaa) I would recommend a how to get started on either nexus & nexus-prisma or pothos. I'm using Nexus / Nexus-Prisma with GraphQL-relay for pagination

Would be cool to see a blog on ORMs later on Prisma vs MikoORM vs Deepkit ORM but IMO see this as a long term blog post. Looking forward to your future blogs keep it up!

[Victoria Lo](https://hashnode.com/@victoria)

[Jun 20, 2022](https://hashnode.com/posts/graphql-for-beginners-schema-first-vs-code-first/62a339c523f5f5accf275ed5/comment/62af85f7d8afe74aa51fde82#reply-62afdb9f0924134a8048b0d2)

Thanks for the comment! Sure thing, I'll add the topics you requested into my backlog~ :)

[Shubham Kumar Singh](https://hashnode.com/@shubhamsinghbundela)

[Jun 10, 2022](https://hashnode.com/posts/graphql-for-beginners-schema-first-vs-code-first/62a339c523f5f5accf275ed5/comment/62a3b3b2a2c282d2d8377c79)

Thanku [Victoria Lo](https://hashnode.com/@victoria)

[Victoria Lo](https://hashnode.com/@victoria)

[Jun 15, 2022](https://hashnode.com/posts/graphql-for-beginners-schema-first-vs-code-first/62a339c523f5f5accf275ed5/comment/62a3b3b2a2c282d2d8377c79#reply-62a989380baf4306d94956a6)

Thanks for reading :)

[Dhruva Srinivas](https://hashnode.com/@carrotfarmer)

[Jun 10, 2022](https://hashnode.com/posts/graphql-for-beginners-schema-first-vs-code-first/62a339c523f5f5accf275ed5/comment/62a35d48a2c282d2d837721a)

Great insights, thank you!

[Victoria Lo](https://hashnode.com/@victoria)

[Jun 15, 2022](https://hashnode.com/posts/graphql-for-beginners-schema-first-vs-code-first/62a339c523f5f5accf275ed5/comment/62a35d48a2c282d2d837721a#reply-62a989490187d006b4f719fa)

Thanks for your question [Dhruva Srinivas](https://hashnode.com/@carrotfarmer)~

[Ophy Boamah](https://hashnode.com/@CodeHemaa)

[Jun 10, 2022](https://hashnode.com/posts/graphql-for-beginners-schema-first-vs-code-first/62a339c523f5f5accf275ed5/comment/62a3487e165482d2b3ee967b)

I've only worked with APIs that were built using the schema-first approach. Looking at the listed advantages of the code-first approach, I think it's worth trying. Thanks for sharing, Victoria.

[Victoria Lo](https://hashnode.com/@victoria)

[Jun 15, 2022](https://hashnode.com/posts/graphql-for-beginners-schema-first-vs-code-first/62a339c523f5f5accf275ed5/comment/62a3487e165482d2b3ee967b#reply-62a989730187d006b4f71a0a)

Yup, I'll write a separate article on how to get started with code-first approach [Ophy Boamah](https://hashnode.com/@CodeHemaa)! Thanks for reading~
