Is there a way to map a column name to a schema fi...
# prisma-whats-new
j
Is there a way to map a column name to a schema field?
Copy code
const List = new GraphQLObjectType({
  name: 'List',
  fields: {
    id: {
      type: GraphQLID
    },
    name: {
      type: GraphQLString
    },

    archived: {
      type: GraphQLBoolean,
      column: 'is_archived' // <--- This thing
    },

    items: {
      type: new GraphQLList(Item),
      resolve: listAllListItems
    }
  }
});
n
I don't understand your question. can you elaborate?