General GraphQL Schema Design Pattern Question I ...
# orm-help
m
General GraphQL Schema Design Pattern Question I noticed in the airBnb Example Amenities are created like this:
Copy code
type 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"
Copy code
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