Validation error of type SubSelectionRequired: Sub selection required for type null of field

When requesting a field that resolves to an object type (or a list of an object type), you have to specify the fields on that object type as well. The list of fields for a particular field (or the root) is called a selection set or a sub selection and is wrapped by a pair of curly brackets.

You’re requesting the carsInterested, which returns a list of Cars, so you need to specify which Car fields you want returned as well:

  customer(id: "5ed6092b-6924-4d31-92d0-b77d4d777b47") {
    carsInterested {
      # one or more Car fields here

Leave a Comment