Add a single module query (without edges/node)
This commit is contained in:
parent
e2c20cca2f
commit
3f159b0473
|
|
@ -1,5 +1,5 @@
|
|||
query ModulesQuery($slug: String!) {
|
||||
modules(slug:$slug) {
|
||||
modules(slug: $slug) {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
query ModuleQuery($id: ID! {
|
||||
module(id: $id) {
|
||||
id
|
||||
slug
|
||||
title
|
||||
metaTitle
|
||||
teaser
|
||||
intro
|
||||
chapters {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
contentBlocks {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
slug
|
||||
title
|
||||
type
|
||||
contents
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -107,6 +107,8 @@ class BookNode(DjangoObjectType):
|
|||
|
||||
|
||||
class BookQuery(object):
|
||||
module = relay.Node.Field(ModuleNode)
|
||||
|
||||
books = DjangoFilterConnectionField(BookNode)
|
||||
topics = DjangoFilterConnectionField(TopicNode)
|
||||
modules = DjangoFilterConnectionField(ModuleNode)
|
||||
|
|
|
|||
Loading…
Reference in New Issue