Migrating from Graphcool to Prisma + graphql-yoga

framework
prisma

#1

I’ve read the following posts before asking


It seems like (in the long-run), I’ll need to use Prisma in order to be able to use Interfaces and Union types (and in general have more flexibility/power).

However, since most of my data already lives in Graphcool, I’d rather finish writing the app and then worry about migration problems later. I think it’s wise to assume that since the team has written the Graphcool Export and Import tools, a migration from Graphcool framework into Prisma would be relatively trivial

https://www.graph.cool/docs/reference/data-import-and-export/data-export-pa0aip3loh/

Are my assumptions correct? If not, I’d rather invest the time in moving NOW to Prisma rather than spend more time in Graphcool.

Also. I love the work you’re doing! I’ve seen some comparisons with Firebase already and you’re very close to that ease-of-use already!

but pls. Interfaces and unions. T_T


#2

In terms of data, the migration is very straight-forward, because both Graphcool and Prisma use a similar syntax for datamodels (SDL), and share a normalized data format.

You can read these detailled instructions on how to migrate data from Graphcool to Prisma:

However, the architecture we suggest for Prisma is very different from Graphcool Framework:

From right to left, we have

  • Database layer
  • Prisma layer
  • GraphQL Server layer
  • Client layer

In this architecture, business logic is implemented in a separate layer, the GraphQL Server layer. Prisma acts as a translation layer from your database to the server. Using GraphQL Bindings in your GraphQL Server, implementation efforts for the resulting GraphQL API are significantly reduced.

If you plan to eventually benefit from the new architecture, I recommend a migration sooner rather than later :slight_smile: The migration guides provide a good starting point for doing so.