'GraphQL Cannot query field '______' on type '______Page'

I am new to GraphQL and am having trouble figuring out how to query things from a collection I have.

Here is my schema.gql:

type Property {
  address: String!
  challenges: [Challenge!] @relation
}

type Challenge {
  created: Time!
  property: Property!
  group: Group!
  guesses: [Guess!] @relation
  askingPrice: Float!
  soldForPrice: Float!
  dateSold: Time!
}

type Group {
  challenges: [Challenge!] @relation
  users: [User!] @relation
}

type User {
  name: String!
  groups: [Group!] @relation
  guesses: [Guess!] @relation
}

type Guess {
  price: Float!
  challenge: Challenge!
  user: User!
}

type Query {
  allProperties: [Property!]
}

and here is the query I am trying to run (in Postman as an HTTP POST with a GraphQL body):

query GetProperties {
    allProperties {
        address
    }
}

and this is the result I get:

{
    "data": null,
    "errors": [
        {
            "message": "Cannot query field 'address' on type 'PropertyPage'. (line 3, column 9):\n        address\n        ^",
            "locations": [
                {
                    "line": 3,
                    "column": 9
                }
            ]
        }
    ]
}

It's hard to Google because of the names of my things make it not generic.

Any help appreciated!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source