hi everyone I need some help translating graphql a...
# orm-help
w
hi everyone I need some help translating graphql api to rest api i have a database schema like this type User { id: ID! @id email: String! @unique workspaces: [Workspace!]! } when i do graphql playground on graphql server with this api call, i get successful result
Copy code
query {
  user (where: {
    email: "<mailto:chen1@gmail.com|chen1@gmail.com>"
  }) {
    id
    workspaces {
      id
    }
  }
}
Copy code
{
  "data": {
    "user": {
      "id": "cjunu2avf5lra0b30tqyc62mb",
      "workspaces": [
        {
          "id": "cjunu33pa8h3a0b12zsmax1fw"
        }
      ]
    }
  }
}
however when i try to get the same thing in rest api in my server code
Copy code
const user = await this.prisma.user({
        email: this.user.email
      });
      console.log(user);
i can only get partial data like this. i can’t figure out how to get workspaces array to be included
Copy code
{ id: 'cjunu2avf5lra0b30tqyc62mb',
  email: '<mailto:ichenwu01@gmail.com|ichenwu01@gmail.com>' }
n