useOne doesn't return expected value
I have this:
interface IProduct {
id: number;
name: string;
material: string;
}
// const int_vehicleId = params?.id ? parseInt(params.id, 10) : undefined;
const { data:vehicle_data, isLoading, isError } = useOne<IProduct, HttpError>({
resource: "vehicles",
id: "1",
});
And as you can see I should get back the name and material.
The vehicle has these properties in its model.
But I noticed the request that is going out is limited:
"query ($id: ID!) { vehicle (id: $id) { id } }"
so it asks back only the id.
Why is this?
interface IProduct {
id: number;
name: string;
material: string;
}
// const int_vehicleId = params?.id ? parseInt(params.id, 10) : undefined;
const { data:vehicle_data, isLoading, isError } = useOne<IProduct, HttpError>({
resource: "vehicles",
id: "1",
});
And as you can see I should get back the name and material.
The vehicle has these properties in its model.
But I noticed the request that is going out is limited:
"query ($id: ID!) { vehicle (id: $id) { id } }"
so it asks back only the id.
Why is this?
