Prisma1: Clone types

Created on 2 Nov 2016  路  3Comments  路  Source: prisma/prisma1

This feature request comes from my experience on graphcool as user and it's something that i needed that i think could be useful for everyone, under certain circumstances.

Situation:

the user had to setup multiple models, some of them has a lot of fields and they are similar to each other.

Issue:

the user has to create every field of every model manually, consuming a lot of time on models with fields that he/she has already created

Request:

a possible solution would be placing a 'duplicate' or 'copy' button on the console interface, on the model name row, or inside the model page that creates a new model called, for example, _1, that already contains every field existing on the origin model.
If for some reason a field or a relation cannot be duplicated the user should have a warning on screen.

Most helpful comment

I totally see the value in this feature and we'll consider it when planning the upcoming roadmap. It could also be useful in combination with interface types.

All 3 comments

I totally see the value in this feature and we'll consider it when planning the upcoming roadmap. It could also be useful in combination with interface types.

Any update on this, or an idea of when this will be ready? I'm definitely looking forward to this feature, :slightly_smiling_face:.

The CLI offers the right abstraction for this feature. You can simply copy paste the type in types.graphql, adjust the type name and fields, and deploy the new type to your project.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

marktani picture marktani  路  71Comments

Bradly-kunthrope picture Bradly-kunthrope  路  37Comments

marktani picture marktani  路  71Comments

marktani picture marktani  路  34Comments

sorenbs picture sorenbs  路  48Comments