Add filter in sub query
Closed this issue · 1 comments
query getPackage($slug: String!) {
getPackage(slug: $slug) {
id
user_id
package_type_id
name
slug
packageLibraries {
id
library {
id
libraryLessons(filter: { lesson: { status: { _eq: "published" } } }) {
id
lesson {
id
title
description
tags
status
}
}
}
}
}
}
How to add subquery in lesson? Basically I want to filter the lesson with published status only.
schema
type Library {
id: ID!
user_id: String!
name: String
description: String
created_at: DateTime!
updated_at: DateTime!
deleted_at: DateTime
user: User
libraryLessons: [LibraryLesson]
libraryResources: [LibraryResource]
libraryCommunityTimelines: [LibraryCommunityTimeline]
libraryCommunityChats: [LibraryCommunityChat]
}
type LibraryLesson {
id: ID!
library_id: String!
lesson_id: String!
created_at: DateTime!
updated_at: DateTime!
deleted_at: DateTime
lesson: Lesson
}
You can use the following channels to ask support questions:
This repository and the issue tracker are used to advance the development of Lighthouse.
Issues that are neither detailed bug reports nor well thought-out feature proposals will be closed.