Specifying after or before does not change the result of a query, nor does it throw and error.
Example:
class Person(models.Model):
name = models.CharField(max_length=50, help_text="Property number or name")
class PersonType(DjangoObjectType):
class Meta:
model = Property
interfaces = (relay.Node, )
node = relay.Node.Field()
class PersonConnection(relay.Connection):
class Meta:
node = PropertyType
class Query(graphene.ObjectType):
node = relay.Node.Field()
people = DjangoFilterField(Person)
Performing the query:
query {
people(first: 2) {
edges {
node {
id
name
}
}
}
}
Returns:
{
"data": {
"people": {
"edges": [
{
"node": {
"id": "UHJvcGVydHlUeXBlOjE=",
"name": "Hannah"
}
},
{
"node": {
"id": "UHJvcGVydHlUeXBlOjI=",
"name": "Steve"
}
}
]
}
}
}
And performing:
query {
people(first: 2, after: "UHJvcGVydHlUeXBlOjI=") {
edges {
node {
id
name
}
}
}
}
Returns exactly the same: "Hannah" and "Steve".
I feel as though I'm missing something, but I have tried this out on two separate projects and the problem persists - any guidance is hugely appreciated!
@jckw "after" is not an id but a "relay cursor", it usually maintained by relay on client and response looks like that:

In [3]: base64.decodebytes(b'YXJyYXljb25uZWN0aW9uOjk=')
Out[3]: b'arrayconnection:9'
You can try to add cursor field to your query:
query {
people(first: 2) {
edges {
node {
id
name
}
cursor
}
pageInfo {
endCursor
hasNextPage
}
}
}
Thank you so much @kalekseev! Works as expected. Should've read the Relay docs more closely 馃槵
Most helpful comment
@jckw "after" is not an id but a "relay cursor", it usually maintained by relay on client and response looks like that:
You can try to add cursor field to your query: