https://github.com/onflow/flow-playground-api/pull/14
https://github.com/onflow/flow-playground/pull/177
Contract struct is introduced for this. index refers to its Account index (i.e 0x01 is 0, etc).
type Contract {
id: UUID!
accountIndex: Int!
title: String!
code: String!
deployedCode: String
}
index refers to the Account's index which the contract belongs to
Previous contract info inside the Account struct has been removed
type Account {
id: UUID!
address: Address!
~~draftCode: String!
deployedCode: String!~~
deployedContracts: [String!]!
state: String!
}
ContractList.tsx react component is created to display the account's contracts as tabs above the Cadence editor.

Alternatively, I was initially fiddling contract tabs as vertical list. Based on UX review, I can make necessary changes.