MikePuglisi
08/20/2018, 2:46 PMtype Amenities {
airConditioning: Boolean!
babyBath: Boolean!
babyMonitor: Boolean!
babysitterRecommendations: Boolean!
...
}
I'll be using a relational database as my data source, and having a "hard-coded" list like the above seems limiting to me.
For example, an administrator wouldn't be able to add a new amenity. I would think something like the following would be more desirable, as it would allow an administrator to easily add new "amenities"
type Amenity {
id: ID!
name: String
}
Would this be a bad design pattern in the world of GraphQL (which I'm new to)?
Related:
https://github.com/prisma/graphql-server-example/blob/master/prisma/datamodel.graphql