#How to filter with relation field?

1 messages · Page 1 of 1 (latest)

hexed furnace
#

Hi everyone,
I have a question for querying with relation field.
Here are 2 models.

type Video @model {
id: ID!
user: UserProfile @connection(name: "UserSubmittedVideos")
videoUserId: ID
title: String!
}

type UserProfile @model {
id: ID!
email: String
name: String!
submittedVideos: [Video] @connection(name: "UserSubmittedVideos")
}

Now I want to query videos with name field of UserProfile model.
Please let me know how to do that.
Best
Adam

little loom
#

Hi @hexed furnace what language or framework are you trying to perform the query in? And are you using GraphQL or DataStore?