Using the below Type Definition and query:
export const typeDefs = gql`
type Query {
getLocations: [Location]
}...
type Location {
id: ID!
name: String!
}`
query {
getLocations
}
I'm receiving the error:
Field \"getLocations\" of type \"[Location]\" must have a selection of subfields. Did you mean \"getLocations { ... }\"
The query does return the an array of Location objects, but the validation fails. Having looked through the graphql and apollo-graphql docs and frantically googled this error it seems to be the proper implementation. Is there anything else that could be impacting this?