Is GraphQL an ORM?

GraphQL is not an ORM, because it doesn't understand the concept of DBs. It just gets the data from a "data source", which could be static, from a file, etc. Nor can it figure out how to get data once you point the source at it. You have to write resolver functions that tell the DB how to find the value of each field.

Some gems/packages will simplify some of this. Some of those may be or may become ORMs, but GraphQL itself is completely platform/data source agnostic.


No it's not. With only GraphQL, we can't access the database easily, because the language needed to send query isn't mapped by an ORM.

ORM makes it easy to access a database, which is in a sense is more like creating a virtual database which our programming language can easily access. Then GraphQL send its query into that virtual database.

Tags:

Orm

Graphql