I want to make it possible to filter on all scalar types of a object type. But I don't want to specificy a input filter for every object type to create filters for the scalar types.
Currently I have the following code:
type Product {
id: Int!
name: String!
description: String!
price: Float!
weight: Float!
size: String!
quantity: Int!
URL: String
categories (filter: CategoryFilter): [Category!]
manufacturers: [Manufacturer!]
}
input CategoryFilter {
id: Int
name: String
description: String
}
type Category {
id: Int!
name: String!
description: String
}
To filter on every field of category. I created a CategoryFilter. But I don't want to create a filter for every object type. I just want to create one filter, that I can apply to all object types to filter on the scalar types of that object type.
Is this possible?