HNHacker News
TopNewBestAskShowJobs

nikolasburk

194 karma · joined February 4, 2015

submissionscomments
nikolasburk··on To ORM or Not to ORM
What a great article, this paragraph really reasonated with me:

> Any situation where complex functionality is wrapped in another layer runs the risk of increasing the overall complexity when the wrapping layer is itself complicated. This often comes along with leaky abstractions - wherin the wrapping layer can't do a perfect job wrapping the underlying functionality, and forces programmers to fight with both layers simultaneously.

I think we can all agree that a mapping layer from a relational DB to your language is needed in almost every application, so the question is whether to build it yourself or use an off-the-shelf solution.

I work at prisma.io and we've set out to make database workflows as easy as possible for developers, this includes database access (= ORM) and schema migrations.

With polyglot persistence becoming a standard pattern in modern applications, today's ORMs fall short since they only map from relational databases. Our goal at Prisma is to provide a type-safe mapping layer to all your databases at once. This will allow developers to focus on their application logic and not worry about how to access the data from the various data sources.

nikolasburk··on Prisma – Database tools for modern application development
(I work at Prisma)

Prisma is open-source and you are typically running it in production by running it on your own cloud infrastructure.

The commercial parts of Prisma are called Prisma Cloud and Prisma Enterprise. Prisma Cloud aims to simplify various Prisma workflows such as server and data management, monitoring, backups, migrations/rollbacks, ... We're also planning a "Prisma Serverless" offering so you don't need to host the Prisma server yourself.

nikolasburk··on Prisma – Database tools for modern application development
Thanks a lot for this feedback and great to hear you like the code-first approach of GraphQL Nexus for building your GraphQL server!

For anyone who is curious about Nexus, I recommend our blog article series about code-first vs SDL/schema-first GraphQL server development: https://www.prisma.io/blog/the-problems-of-schema-first-grap...

Also, for a quick and ready-to-run example, you can check out this: https://github.com/prisma/prisma-examples/tree/master/node/g...

nikolasburk··on Prisma – Database tools for modern application development
Thanks so much for your positive feedback, we really appreciate it! We indeed have many exciting improvements in the store, to get an overview of those feel free to check out our RFCs: https://github.com/prisma/rfcs Also, if you're building a GraphQL server you might want to check out GraphQL Nexus which is an alternative to the SDL-first approach taken with `graphqlgen`: https://www.prisma.io/blog/using-graphql-nexus-with-a-databa...
nikolasburk··on Prisma – Database tools for modern application development
(I work at Prisma)

That's a great question! We started with a major focus on GraphQL which has now become more generic as Prisma can really be used for any app that uses a DB (REST, gRPC, ...). With that GraphQL history, we've put a lot of focus on the Node/TypeScript ecosystem because that's where GraphQL tooling is most mature. However, we're definitely planning to support more languages in the future. In particular, we are opening the generator API for the Prisma client which means it will be possible for anyone to implement the Prisma client in their own preferred language: https://github.com/prisma/rfcs/blob/client-generators/text/0...

nikolasburk··on Prisma – Database tools for modern application development
I work at Prisma, we've recently written a blog post about exactly this question where we also compare Prisma to other services like Hasura or AWS AppSync: https://www.prisma.io/blog/prisma-and-graphql-mfl5y2r7t49c/
nikolasburk··on Prisma – Database tools for modern application development
I work at Prisma and it's really awesome to hear such feedback! Please let us know if you have any further questions, we're happy to help :)
nikolasburk··on Prisma – Database tools for modern application development
(I work at Prisma)

It is very important to understand that Prisma is NOT a GraphQL-as-a-Service like Hasura or Postgraphile. It's really a suite of database tools that you can use for any use case (building GraphQL, REST or gRPC APIs, or use it in any other app where you need a database). We recently wrote a blog post about this topic: https://www.prisma.io/blog/prisma-and-graphql-mfl5y2r7t49c/

Also, the Prisma server (that proxies the database) is indeed currently a mandatory component in the Prisma architecture. However, this requirement will be lifted very soon (as we're currently rewriting the Prisma core in Rust) and it will be possible to run Prisma as a library, just like any other ORM.

nikolasburk··on Prisma – Database tools for modern application development
This is a very common question, we actually recently wrote a blog post about exactly this topic: https://www.prisma.io/blog/prisma-and-graphql-mfl5y2r7t49c/

Hopefully that clears it up!

nikolasburk··on Prisma – Database tools for modern application development
Thanks a lot for the feedback Max, we really appreciate it! We're currently working on many improvements (e.g. a more powerful data modelling syntax, a sophisticated migration system, opening up the database connector and client generator APIs, ...) for Prisma that you can check out in our RFCs: https://github.com/prisma/rfcs
nikolasburk··on Prisma – Database tools for modern application development
(I work at Prisma)

Thanks a lot for the positive feedback, we appreciate it a lot! As to your question, I assume with "backend schema" you're talking about the Prisma datamodel? Whenever you change the datamodel, you're also re-generating your Prisma client. So, it can definitely make sense to version your Prisma client as your datamodel changes. Does this clear it up?

The main purpose of the code generation really is to have proper typings for all database operations based on the datamodel. For example, if you're adding a new model type to the datamodel, Prisma doesn't only generate according models in your programming language, it also generates types that facilitate filtering, pagination, ordering and any other operations of your database.

nikolasburk··on Prisma – Database tools for modern application development
I totally agree with this and this is actually very relevant for us at Prisma as we're supporting various kinds of databases. Our goal isn't to have one universal data access abstraction, but instead we want to ensure developers still get all the benefits of the databases they're using underneath (as all of them have different strengths and are great for different use cases)! We're currently working on an improved version of our data modelling language that will make it possible to model DB-specific properties (indices, special DB types, ...) into your Prisma datamodel, you can find the RFC for it here: https://github.com/prisma/rfcs

PS. We've looked into mammoth a lot for inspiration and really liked it, great work!

nikolasburk··on Prisma – Database tools for modern application development
I work at Prisma and this is one of the questions we're currently hearing the most (we'll actually publish a blog post about this exact question soon).

Generally, think of Prisma as a suite of database tools that simplify workflows in three different areas:

● Database access / ORM (lightweight, auto-generated and type-safe database client for various languages)

● Declarative data modelling and migrations

● Data management with modern admin UI

I think it also differs from traditional ORMs in that it supports multiple databases. We see a trend that many modern apps are built on top of a variety of databases, it might use Posgtres, Elastic, Mongo and Neo4j all at the same time for different purposes. We are embracing this and with the Prisma client it will be possible in the future to access all these data sources in a single, coherent and type-safe API.

Feel free to check out our roadmap to get an idea of what we're working on: https://github.com/prisma/prisma/blob/master/ROADMAP.md

nikolasburk··on Prisma – Database tools for modern application development
(I work at Prisma)

It's true that we haven't focussed on a mobile experience for the docs so far (assuming a primary use case for the docs is when being used on your computer as you're using Prisma). However, we see that many people like to browse docs on their phones to learn about the tool, so we are now making it a priority to make our docs responsive! Thanks for the feedback.

nikolasburk··on Apollo Client 2.5 for GraphQL Announced
We wrote about this a while a ago on the Prisma blog: https://www.prisma.io/blog/top-5-reasons-to-use-graphql-b60c...
nikolasburk··on Ask HN: Choosing an entrepreneur's stack in late 2018?
Be aware that MDG is now almost entirely shifting their attention to GraphQL and Apollo. I don't think Meteor.js will be maintained much longer.
nikolasburk··on Ask HN: Choosing an entrepreneur's stack in late 2018?
Backend: GraphQL + TypeScript with Prisma on top of a MongoDB/PostgreSQL Frontend: React / React Native + Apollo Client

Then use 3rd-party services for the "standard" parts of your business logic (like Auth0 for authentication).

This stack allows to move incredibly fast on the front- and backend and really lets you focus on building value-adding features instead of dealing with complexity that comes from e.g. database workflows (Prisma) on the backend or state management on the frontend (Apollo Client).

EDIT: As a side-note, companies like Labelbox.com (raised 3,9 mio seed round) or Hyrecar.com (recently IPOed) are using a similar stack and have been vastly successful with it.

nikolasburk··on Piecing Together GraphQL
Yes :) https://github.com/prisma/prisma
nikolasburk··on Ask HN: Should I use golang for building a graphql API
Go is a great language for building GraphQL servers, the https://github.com/99designs/gqlgen library helps you by build type-safe GraphQL servers and reduces the boilerplate. You can find an example here: https://github.com/prisma/prisma-examples/tree/master/go/gra...

Otherwise I'd recommend TypeScript - the tooling ecosystem around GraphQL is definitely most advanced in the JS space. If you're interested, you can check out an example here: https://github.com/prisma/prisma-examples/tree/master/typesc...

nikolasburk··on Ask HN: Is GraphQL still growing, established or already in decline?
I think the State of JS 2018 survey is a great indicator for its growth and the interest of the developer community: https://2018.stateofjs.com/data-layer/graphql/

Other growth indicators:

- More and more GraphQL conferences (with growing number of attendees), e.g. GraphQL Europe with 300 attendees last year, 500 attendees this year and as the rebranded GraphQL conf is aiming for 1000 attendees next year.

- The GraphQL Foundation that's currently being established (https://medium.com/@leeb/introducing-the-graphql-foundation-...)

- An ever growing list of companies adopting GraphQL (http://graphql.org/users); big companies betting on GraphQL like Facebook, GitHub, Twitter, Airbnb, Shopify, ...

I personally believe that GraphQL is still in its infancy and will become the new API standard over the next few years. I recently wrote an article about my personal top reasons for adopting GraphQL: https://www.prisma.io/blog/top-5-reasons-to-use-graphql-b60c...

nikolasburk··on Set up a production-ready realtime GraphQL backend
I just tried putting the currently available tools a bit into perspective - check my comment above :) https://news.ycombinator.com/item?id=18494248
nikolasburk··on Set up a production-ready realtime GraphQL backend
Disclaimer upfront: I work at Prisma.io :)

It's very important to properly distinguish Hasura and Prisma (as well as AppSync & Graphcool while we're at it).

Hasura, AppSync and Graphcool are all Backends-as-a-Service (basically "Firebase for GraphQL"). You get an instant GraphQL CRUD API with a database and some ways to configure authentication/authorization. This is great for simpler applications but typically comes with limitations when requirements become more complex. Speaking from experience after 2 years of running Graphcool, we've learned from our customers that (especially larger) development teams quickly outgrow the capabilities of a BaaS and need more control and flexibility in their technology stack. This was exactly the reasoning why we've moved to Prisma which now replaces traditional ORMs and makes it easier for developers to build GraphQL servers (but also other applications like REST APIs).

Another point is that GraphQL was invented as a query language for APIs, not databases. Exposing a CRUD GraphQL API to client applications was never the purpose of GraphQL - clients should still be able to consume a domain-specific API that's tailored to their needs (you typically don't want to expose all CRUD operations to your clients in a production application).

With Prisma, we're trying to create the right abstraction™️ that helps people get started quickly but at the same time Prisma should remain the proper tool for them as their projects scale and grow in complexity.

nikolasburk··on Launch HN: OneGraph (YC S18) – Build API Integrations with GraphQL
I just want to chime in with a link to a talk that Daniel gave at this year's GraphQL Europe conference: https://youtu.be/eLSWLtmzdWU?t=3m43s (It links to the OneGraph demo Daniel gave during the talk.)
nikolasburk··on Demo: GraphQL with Node-Oracledb for Oracle Database
This looks very interesting! I work at Prisma and am also the author of the GraphQL vs REST article/video that's linked at the end of the article.

At Prisma, we're currently working on an DB connector for Oracle that'll automatically turn your Oracle DB into a GraphQL API. Feel free to check it out and join the discussion on GitHub: https://github.com/prismagraphql/prisma/issues/1644/

nikolasburk··on The #GQL manifesto for a unified graph query language
Hmm very interesting, I'd love to have more information on what this project is supposed to be and who's behind it? E.g. have they considered something like GraphQL being a potential solution for this undertaking? Also interested to hear how it would relate to OpenCRUD.org
nikolasburk··on Introduction and Quick Guide to GraphQL for BackEnd and FrontEnd
This is a great and very instructive post for people who are new to GraphQL!

If you want to dive deeper and get some practical experience, I can recommend the following resources (disclaimer: I've personally contributed to all them):

- Fullstack tutorial with React & Apollo: https://www.howtographql.com/react-apollo/0-introduction/

- Backend tutorial for Node.js: https://www.howtographql.com/graphql-js/0-introduction/

- GraphQL Boilerplates (Node, TypeScript, React, Vue,...): https://github.com/graphql-boilerplates

nikolasburk··on Introduction and Quick Guide to GraphQL for BackEnd and FrontEnd
You're hitting the nail on the head that implementing the resolvers is the hard part when building a GraphQL server! I work at Graphcool (www.graph.cool) and we recently open-sourced a new tool called Prisma that will help you with exactly that part! Our goal with Prisma is to automatically turn any database into a GraphQL API - right now we have connector for MySQL, but we're working on more for Postgres, MongoDB, Neo4j etc... You're then building your application server using GraphQL bindings (read more here: https://blog.graph.cool/reusing-composing-graphql-apis-with-...) which allows to simply delegate incoming queries to the underlying Prisma engine.

Would be curios to hear your opinion on Prisma!

You can try it out here: https://www.prismagraphql.com/docs/quickstart/

You can also check out the 4min demo-video (with TypeScript) I made that explains how it works: https://www.youtube.com/watch?v=20zGexpEitc

nikolasburk··on Introduction and Quick Guide to GraphQL for BackEnd and FrontEnd
This guide really only provides an overview of what GraphQL is so I think it's fair they don't go in depth about auth topics.

If you're curios how authorization can be implemented in a GraphQL server, I recommend the following tutorial: https://www.prismagraphql.com/docs/tutorials/graphql-server-...

Also check out these two awesome projects that provide ways for implementing authorization with GraphQL:

- https://github.com/a-type/prisma-authorized

- https://github.com/maticzav/graphql-shield

If you want to see a practical example of how authorization can be implemented, check out this example project: https://github.com/graphcool/prisma/tree/master/examples/per...

nikolasburk··on Introduction and Quick Guide to GraphQL for BackEnd and FrontEnd
We've been working on a GraphQL IDE that sits on top of GraphiQL but provides many additional features: https://github.com/graphcool/graphql-playground

It has a more user-friendly documentation than GraphiQL as well as tabs and a history of previous operations. It also supports realtime GraphQL subscriptions and conforms to the industry-standard graphql-config format. Further, it allows to easily share your Playground and has support for query performance tracing :) Definitely check it out if you haven't seen it before

nikolasburk··on AWS AppSync – Build data-driven apps with real-time and off-line capabilities
Graphcool does have full subscription suppport!
← PreviousPage 4 of 5Next →