Hello Apollo Community,
I’d like to provide arguments to the FieldSet of a @requires directive. For example with a schema like this:
type Cart @key(fields: "id") {
id: String!
lineItems: [LineItem!]!
"""this would - of course - not be a string in a real example"""
subTotal: String! @requires(fields: "lineItems { quantity product { price(help!!) } }")
}
type LineItem @key(fields: "id") {
id: String!
quantity: Int!
product: Product!
}
extend type Product {
sku: String! @external
"""this would - of course - not be a string in a real example"""
price(quantity: Int!): String! @external
}
How would I go about passing the quantity from my Cart/LineItem to the external product-subgraph? Is that possible at all or is it (if anything) a feature request?