GraphQL - cannot query all records, must provide ID?

Im kind of new to graphql but id like to return a list of all countries, however its constantly asking me for an ID, is it not possible ?

query {
country() {
id
}
}

also as per info on back4app i tried this query

query FindObject {
find(className: “Countrys”) {
count,
results
}
}

and it errors with

Cannot query field “find” on type "Query\

It depends on your model. If you can share it might be easier to help. Anyways, have you tried something like this?

query {
countries {
id
}
}

I am a total noob with GraphQL so maybe i miss something. my collection is called Country, I think i read somewhere that i need to pluralize that so i have tried both

query {
country {
objectId
}
}

and

query {
countries {
objectId
}
}

but get this error "message": "Cannot query field \"country\" on type \"Query\".",

I havent created any kind of GraphQL model or Schema, I thought it was already generated in Parse so I am just running this in the playground

What is the version of parse server that you are running?

Im on parse server “version”: “5.2.5”,

So it should be something like:

query {
  countries {
    edges {
      node {
        id
      }
    }
  }
}

Reference: GraphQL API Guide | Parse

Sorry @davimacedo for the delay. This still doesnt work for me unfortunately :frowning:

I am getting the following errors, I think its something to do with how the Schema is getting defined in parse

{
  "error": {
    "data": null,
    "errors": [
      {
        "message": "Cannot query field \"edges\" on type \"Countries\".",
        "locations": [
          {
            "line": 3,
            "column": 5
          }
        ]
      },
      {
        "message": "Field \"countries\" argument \"id\" of type \"ID!\" is required, but it was not provided.",
        "locations": [
          {
            "line": 2,
            "column": 3
          }
        ]
      }
    ]
  }
}

and this is the query im running with

query getCountries {
  countries {
    edges {
      node {
        id
      }
    }
  }
}

and if I do provide an ID value for the sake of it I get the following error

{
  "error": {
    "data": null,
    "errors": [
      {
        "message": "Cannot query field \"edges\" on type \"Countries\".",
        "locations": [
          {
            "line": 3,
            "column": 5
          }
        ]
      }
    ]
  }
}

Pretty strange, its the only collection where I have this issue, I also see this error now in the logs

[1] warn: Query countries could not be added to the auto schema because it collided with an existing field.