hellojere
03/28/2017, 8:23 AMnilan
03/28/2017, 8:24 AMhellojere
03/28/2017, 8:28 AMnilan
03/28/2017, 8:29 AMhellojere
03/28/2017, 8:54 AMslug
?
query {
allProjects(
first: 2,
after: "cj0ta59xbqapc01041ihfw3fk"
) {
id
title
}
}
Thanks for helping out, reallynilan
03/28/2017, 8:55 AMnilan
03/28/2017, 8:56 AMfirst
and after
OR last
and before
. But if you need to query "around" a specific ID, you could do that:
query {
after: allProjects(
first: 2,
after: "cj0ta59xbqapc01041ihfw3fk"
) {
id
title
}
before: allProjects(
last: 2,
before: "cj0ta59xbqapc01041ihfw3fk"
) {
id
title
}
}
nilan
03/28/2017, 8:56 AMnilan
03/28/2017, 8:56 AMquery {
Project(slug: "some-slug") {
id
}
}
hellojere
03/28/2017, 9:04 AMhellojere
03/28/2017, 9:08 AMquery {
Project(slug: "test") {
id
}
nextProject: allProjects(
first: 1,
after: "cj0ta59xbqapc01041ihfw3fk"
) {
id
title
}
previousProject: allProjects(
last: 1,
before: "cj0ta59xbqapc01041ihfw3fk"
) {
id
title
}
}
nilan
03/28/2017, 9:10 AMnilan
03/28/2017, 9:10 AMcj0ta59xbqapc01041ihfw3fk
you would want the result of Project(slug: "test")
, right?hellojere
03/28/2017, 9:19 AMhellojere
03/28/2017, 9:20 AM