You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class Query(graphene.ObjectType):
#node = relay.Node.Field()
# Allow only single column sorting
employee = relay.Node.Field(Employee)
all_employees = SQLAlchemyConnectionField(
Employee)
# Allows sorting over multiple columns, by default over the primary key
all_roles = SQLAlchemyConnectionField(Role)
# Disable sorting over this field
all_departments = SQLAlchemyConnectionField(Department, sort=None)
query from GraphiQL
{
allEmployees(sort: [name_asc] ) {
pageInfo {
startCursor
endCursor
hasNextPage
hasPreviousPage
}
edges {
cursor
node {
id
name
department {
name
}
}
}
}
}
The result from query would be:
{
"errors": [
{
"message": "Unknown argument \"sort\" on field \"allEmployees\" of type \"Query\".",
"locations": [
{
"line": 2,
"column": 16
}
]
}
]
}
The text was updated successfully, but these errors were encountered:
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related topics referencing this issue.
schema.py
query from GraphiQL
The result from query would be:
The text was updated successfully, but these errors were encountered: