title: Typescript problem when accessing prisma model property
body: <p>I'm fairly new to using Prisma with NestJS and GraphQL, and I cannot get rid of a TS warning when trying to access one of my model properties.</p>
  <p>Here I'm trying to retrieve a datasource record, and convert a json to a base64 string. Here's how I'm trying to do it:</p>
  <pre><code>  async findOne(data: Prisma.DatasourceWhereUniqueInput) {
      const datasource = await this.prisma.datasource.findUnique({
        where: { id: data.id },
      });
  
      const { serviceAccountJson } = datasource;
  
      datasource.serviceAccountJson = Buffer.from(
        JSON.stringify(serviceAccountJson),
      ).toString('base64');
  
      return datasource;
    }
  </code></pre>
  <p>And this is the error I get on my local server:
  <a href="https://i.stack.imgur.com/mlT2f.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mlT2f.png" alt="enter image description here" /></a></p>
  <p>I can get rid of this by adding a @ts-ignore but I feel like it's not really clean to do so.</p>
  <p>This is how my Datasource model looks like in my schema.prisma file</p>
  <pre><code>model Datasource {
    id                  Int       @id @default(autoincrement())
    serviceAccountJson  Json?
  }
  </code></pre>
  <p>Thanks for your help.</p>