Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

Clone types #32

Closed
AlessandroAnnini opened this issue Nov 2, 2016 · 3 comments
Closed

Clone types #32

AlessandroAnnini opened this issue Nov 2, 2016 · 3 comments

Comments

@AlessandroAnnini
Copy link

AlessandroAnnini commented Nov 2, 2016

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.

@AlessandroAnnini AlessandroAnnini changed the title Feature - Model duplication Feature request - Model duplication Nov 2, 2016
@schickling
Copy link
Member

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.

@schickling schickling changed the title Feature request - Model duplication Clone models Nov 2, 2016
@marktani marktani changed the title Clone models Clone types Jun 28, 2017
@jcarva
Copy link

jcarva commented Aug 4, 2017

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

@marktani
Copy link
Contributor

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants