Hi everybody,
I was wondering if anyone knew how to fix a schema.graphql upload issue I’m facing?
I’m trying to update my schema using this file:
But I get a number of errors – The first few are:
Schema does not pass validation. Violations:
Object 'Complaint' does not have a field named 'where'. (line 153, column 13):
complaint(where: ComplaintWhereUniqueInput!): Complaint
^
Object 'Complaint' does not have a field named 'after'. (line 154, column 14):
complaints(after: ComplaintWhereUniqueInput, before: ComplaintWhereUniqueInput, first: Int, last: Int, orderBy: ComplaintOrderByInput, where: ComplaintWhereInput): [Complaint!]
^
Object 'Complaint' does not have a field named 'before'. (line 154, column 48):
complaints(after: ComplaintWhereUniqueInput, before: ComplaintWhereUniqueInput, first: Int, last: Int, orderBy: ComplaintOrderByInput, where: ComplaintWhereInput): [Complaint!]
^
Object 'Complaint' does not have a field named 'first'. (line 154, column 83):
complaints(after: ComplaintWhereUniqueInput, before: ComplaintWhereUniqueInput, first: Int, last: Int, orderBy: ComplaintOrderByInput, where: ComplaintWhereInput): [Complaint!]
^
Object 'Complaint' does not have a field named 'last'. (line 154, column 95):
complaints(after: ComplaintWhereUniqueInput, before: ComplaintWhereUniqueInput, first: Int, last: Int, orderBy: ComplaintOrderByInput, where: ComplaintWhereInput): [Complaint!]
^
Object 'Complaint' does not have a field named 'orderBy'. (line 154, column 106):
Does anybody know the correct way to add the ability to filter types/objects?
I’d like to be able to run a query like:
query Complaints {
complaints( first: 1, where: {
site: {
equals: "pcc"
}
} ){
link
}
Thanks in advance!
UPDATE:
I think I have to implement this myself, based on this post? If that’s the case, it’s not obvious to me where I would add the “where”, “first” (etc) stuff – Does anybody have any pointers on that?