How to pass an object array to graphql

How to pass an object array to graphql

I am working on graphql, how to pass an array of object to the graphql type schema.
for example:
expect output:
“color”: “red”,
“owners”: [
“ownerOcupation”: “teacher”

my schema:

type Query {

type Car {
owners: [owner]

type owner {
ownerName: String
ownerOcupation: String

car entity:
private String color;
private List owners;

owner entity:
private String ownerName;
private String ownerOcupation;

it doesn’t display the owners section as expected. How should I pass the owner into the owners in the car?



Related:  how to fix graphql mutations typename errors